- Posted by
- Thanks Mofi that worked. My replacement was \1\2 and it worked. I could've made the asterisk at the end a look ahead and thus just would've needed \1 as the replacement. Thanks for the tip on the embedded parentheses trick. (SVC\*HC(?::\w{2,})+):\w (?=\*)Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- sitrucz
Dec 29, 2015
- Is there a way to rewrite the following regex so the replacement becomes defined. My understanding is embedded parentheses cause the replacements \1, \2, etc. to become undefined. ( SVC\*HC ( :\w{2,} ) + ) :\w(\*) Sample entries this should match. The part in red should be deleted in the replacement...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- sitrucz
Dec 29, 2015
- Use as Perl regular expression search string (\*[MN]\d+)(?:\1)+~ and as replace string \1~ Thank you very much that works. Your explanation will be beneficial to my future "attempts" at finding these complicated streams. I did not know backreferencing using the Unix engine in Find did not work. Sho...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- sitrucz
Dec 18, 2015
- Thanks for looking into it. It finds all of these matches in my test file below but the only valid one is the last. MOA***N657~ MOA***M15~ MOA***N657~ MOA***N657*M15~ MOA***N30~ MOA***N30~ MOA***N30~ MOA***M15*M15*M15~ Do you have any other suggestions?Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- sitrucz
Dec 18, 2015
- I need to replace this line: MOA***M15*M15*M15~ with: MOA***M15~ How can I write a generic expression as M15 could change. It could be N121*N121*N121*N121 and so forth. The count could also change. For example it could be duplicated 2, 3, 4, or more times. Thanks.Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- sitrucz
Dec 18, 2015