How Does EmEditor Handle Regex? Unveiling Its String Pattern Matching Skills
How Does EmEditor Handle Regex? Unveiling Its String Pattern Matching Skills
Viewing 8 posts - 1 through 8 (of 8 total)
- Author
Posts - September 5, 2010 at 5:02 am #8922
hydra
Member
i have a string that contains 3 characters that vary, it looks like this: board=XYZ
note: sometimes X=Y, or Y=Z (they can be either a letter or a number). thus, sometimes the string will read like this: board=K66.
what i want to do, is to find every instance where the variable pattern looks like “XYY” and switch the order to be “YYX”. can emeditor do this using the regular expression function? or can it only be done via script/macro?
September 5, 2010 at 5:28 am #8923
Yutaka Emura
Keymaster
Hello hydra,
In the Replace dialog box, you can use replace
=(w)(ww)
with
=21
and check Use Regular Expressions.
Please let me know if you have further questions.
Thank you!
September 5, 2010 at 5:51 am #8924
hydra
Member
hi yutaka,
thx for the quick reply, however it doesnt do what i need it to do. allow me to explain:
1. when the pattern “board=XYY” is found, i need it to be changed to “board=YYX”. your above suggestion does this. so far so good.
2. BUT, when the pattern XXY is found, i want it to do nothing! your above suggestion changes all instances of XXY into XYX. this is something i must avoid.
is there any expression that can do both #1 while avoiding #2?
September 5, 2010 at 6:00 am #8925
hydra
Member
if the regular expression function cant do this, can u write a simple script/macro that does this for me?
September 5, 2010 at 6:49 am #8926
Jibz
Member
Try searching for
=(w)((w)3)
and replace with
=21
September 5, 2010 at 7:02 am #8927
hydra
Member
jibz,
such an elegant solution! thank u so much!
September 5, 2010 at 6:54 pm #8928
Yutaka Emura
Keymaster
That’s an excellent solution. Thnaks jibz!
September 6, 2010 at 5:20 am #8929
Jibz
Member
Glad to hear it worked :-). - Author
Posts
Viewing 8 posts - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.
Also read:
- [New] Best WebP Converter How to Convert WebP to JPG
- [New] Logo Mastery for Podcasts Elevate Your Visual Impact
- [Updated] 2024 Approved Discovering If Muted on Snapstreak
- [Updated] Iconic Story Arcs in Cinema’s Pantheon
- 1. Effortless File Recovery: Solutions for Auto-Deleted Data on Your PC
- 2024 Approved Masterclass in TV Streaming The Ultimate Guide
- Determining Ideal iCloud Storage Capacity for Effective Data Backups
- How To Transfer Data From Apple iPhone 14 To Android/iOS? | Dr.fone
- In 2024, How to Change your Itel P55 5G Location on Twitter | Dr.fone
- In 2024, Proven Strategies for Creating Superb IGTV Videos on Smartphones/DLSRs
- Modi Per Risolvere Il Problema Di Restauro Dei File in Lightroom: Tre Tecniche Efficaci
- Next-Level Graphics: Boost Gameplay Fluidity and Performance Using Advanced AI Frame Rate Optimization
- Perifernal Input/Output Error Triggers Unprocessed Request
- Schritt-Für-Schritt Anleitung Zum Sicheren Datentransfer Zwischen Zwei Computern
- Step-by-Step Instructions for Crafting a Sony Vaio System Repair Disc with Windows 7
- Ultimate Guide for Elevating Videos From Basic SDR to Breathtaking HDR Splendor
- WhatsAppデータのiCloud確認と表示:ステップバイステップ・チュートリアル
- Xcopy Vs. Robocopy: A Comprehensive Feature and Alternative Solution Comparison
- どうやってWindows 11システム画像バックアップを回復する?
- Title: How Does EmEditor Handle Regex? Unveiling Its String Pattern Matching Skills
- Author: Brian
- Created at : 2024-11-22 01:55:55
- Updated at : 2024-11-22 23:30:09
- Link: https://win-net.techidaily.com/how-does-emeditor-handle-regex-unveiling-its-string-pattern-matching-skills/
- License: This work is licensed under CC BY-NC-SA 4.0.