- Posted by
- I rather use $ in replacements because you are not limited to max 9 groups (\1 .. \9). You are virtually unlimited using $. I successfully tested groups like $531 and similar high numbers. Unfortunately $ is not allowed as backreference in a Perl regexp itself. At least I don't know the way how to u...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
13:54 - Sep 12
1 Like recived
- BTW It can be simplified to: F: ^(.+?\l)(\u.+) R: $2\r\n$1\r\n And Match case is not needed...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
12:33 - Sep 12
1 Like recived
- If you remove bold markers then this should work F: ^(.+?\l)(\r\n)?(\u.+) R: $3$2\r\n$1\r\n BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
12:23 - Sep 12
1 Like recived
- Hi, I would prefer this Perl regexp because of UTF-8 characters and not only A-Z (\l = any lower character, \u = any upper character) F: \l(\r\n)?\K(?=\u) R: \r\n BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
11:41 - Sep 12
1 Like recived
- Hi, Because there is no feature to count characters inside the string matched by a Perl regular expression you must consider the worst case when the third column is only one character long so the first added value 0.025 must be preceded by seven spaces. Then the second regexp replace removes the ext...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
21:03 - Jan 23
1 Like recived
- Hi Jarva, Mofi's regexes are ok but if you want to use a more exact pattern then the following one (Perl syntax) could be useful. And it also demonstrates the use of DEFINE ;) F: (?(DEFINE)(?<refnum>\d+(?:-\d+)?)) +\[(?&refnum)(?:,(?&refnum))*\] R: <leave it empty> This pattern respects the inner s...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 14, 2023
2 Like recived
- Just be careful because ? itself can be used as a quantifier as well. Personally, I suggest to think of quantifiers in this way: greedy * any to 0 + any to 1 ? 1 to 0 {n,m} m to n non-greedy *? 0 to any +? 1 to any ?? 0 to 1 {n,m}? n to m I believe It helps to better understand how the r...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Mar 11, 2023
1 Like recived
- Hi, do I understand you correctly that you need to highlight all unusual ASCII characters from range x00-x21? Ideally like Notepad++? BR, FleggyPosted in UltraEdit General Discussion
-   Topics
-   Views
- fleggy
Oct 19, 2022
1 Like recived
- Hi, You can use Perl regular expressions to achieve your goal. 1st step - split multivalues lines F: [;,] * R: \r\n 2nd step - delete lines with gmail email F: ^.*@gmail\.com\r\n R: <leave it empty> 3rd step - remove duplicates 3a) using Perl regex F: ^(.+)\r\n(?=(?s:.*?^\1$)) R: <leave it empty> or...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Dec 07, 2021
1 Like recived
- Hmm, I forgot to make the regexp safe, thanks Mofi. It's time to use some control verbs :) The safe version: F: \w=\K(")?([\w ]+)(?(1)(?(?=")(*SKIP)(*FAIL))|"?)(?!\w*=) R: "\2" BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Nov 01, 2021
1 Like recived
- Hi Matt, you can set one hotkey for QuickFind and another one for Find. For example I am using Ctrl + Shift + I Quick find Ctrl + F Find More detailed information is here BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 02, 2021
1 Like recived
- Hi, you have to distinguish between [] and (). [] means a character set () usually means a capturing group So your Find regexp should look like: ^[^\r\n,]+,[^\r\n,]+,\K.+ And the replace expression: "$&" Your task does not require any capturing group. In the above find regexp the symbol \K means: sh...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Aug 12, 2021
1 Like recived
- Hi, you can use this Perl regexp which matches all 8digit sequences of the same number. (\d)(?=\1{7}) If you need to match a particular digit then replace \d with the desired number. For example (3)(?=\1{7}) BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 21, 2021
1 Like recived
- Yes, ANIMAL is just a name of the group. This group has its definition - match either dog or cat and when the match is found then this group also has its content - the matched word. Lately you can reference to both - to the definition (?&ANIMAL) or to the matched (captured) word \k<ANIMAL> . (? <ANI...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 29, 2020
1 Like recived
- BTW: Here is another pattern without the alternation. For education purpose :) (? <ANIMAL> \b (?: dog | cat ) \b ) .+ (?! \k <ANIMAL> ) (?& ANIMAL ) .*$Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 29, 2020
1 Like recived
- Well, I don't want to look like a nit-picker but if you want to learn more about quantifiers then I suggest this little optimalization using the possessive quantifier: <video muted="1" preload="auto"[^>]+?src="([^\t\r\n."]+?)\.mp4"[^>] *? ></video> <video muted="1" preload="auto"[^>]+?src="([^\t\r\n...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
May 29, 2020
1 Like recived
- If you really need to use regexp for whatever reason: (?s).*\KswitchPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
May 21, 2020
1 Like recived
- Hi Mofi, it looks like UE uses Boost library v1.68 according to the UE Help. The topic Regular Expressions (Perl Style) refers to this link BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
May 05, 2020
1 Like recived
- Hi, UE supports named groups in replace in this form: $+{nxt} BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
May 05, 2020
1 Like recived
- Well, the first double quote is not in column #6 but in #7. Simply change the find regex to: ^(.{6})"(.*)" The rest remains the same.Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Aug 02, 2019
1 Like recived
- Hi, another double quotes beyond the ending one are allowed? Are the inner double quotes prefixed by some special character (backslash,...)? It both answers are "NOT" then you can try this Perl regular expression: F: ^(.{5})"(.*)" R: \1\2 BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Aug 02, 2019
1 Like recived
- Hi, maybe this Perl regex will work for you. I know it is not the optimal one - Quick'n'Dirty (tm) :) Name CG\$AN(?s:.*?)^\K[ \t*]+hint\b.*$ Use Find in Files, check Result to edit window ON, show 0 lines before and 0 lines after. The result will need some p...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
May 10, 2019
1 Like recived
- Hi, you cannot CUT them directly but you can delete them. Step by step from the very beginning: In Find dialog check List lines containing string and check Filter lines with selecting Hide . Click on button Next . Do Copy to clipboard or Copy results to new file from Find String List context menu. (...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 28, 2019
1 Like recived
- Hello everybody, following patterns match the correct tag pairs including/excluding a single tag. Perhaps some little tuning will be needed as I usually do not work with HTML/XML. But I use it frequently in this forum. :) 1. Match XXX tag pair <XXX> ... </XXX> or a single XXX tag <XXX/> (?s) (?<MAIN...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 23, 2019
1 Like recived
- Hi isomenath, and what about this? - replace < and > to some safe placeholders for all paired tags - replace remaining < and > to hex values - replace placeholders back to < and > I am not familiar with HTML so this is probably naive approach. But you can try ;) 1. Replace < to `` and > to ~~ for al...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 19, 2019
1 Like recived
- Or you can use this in case there are more adjacent capital letters :) F: (?-i)(?<![A-Z\s])([A-Z]+) R: <space>\1 BTW a little off-topic - UltraEdit version 26.00 uses Boost Perl regular expression library version 1.68 . And IDM implemented almost all missing features (backtracking control verbs, nam...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jan 30, 2019
2 Like recived
- Hi Manuel, everything is possible. Warning! Following replaces are a little crazy ;) 1. Normalize spaces F: ^\h*(\S{3,30})\h+(\S+)$ R: \1 \2 2. Adjust spaces according to the length of the 1st word F: ^\h*(?|(\S{30})\h{30}|(\S{29})\h{29}|(\S{28})\h{28}|(\S...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Nov 22, 2018
1 Like recived
- Hi, it looks like that the pattern \\( is misinterpreted as \ and \(. Please send a message to IDM support. Meanwhile you can use this workaround to separate \ and ( .*[\\](.*)\. BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 27, 2018
1 Like recived
- Hi luoqianhe this should solve your problem: (?s)<(?<TAG>Event ID)\b[^>]*+>(?>(?:(?!<\k<TAG>\b)(?!</\k<TAG>\b)(?!<Modified\b).)++)*+</\k<TAG>> You can find more information here: Which RegExp to find a block of several lines, thanks to criteria relative to first and last line of the block BR, Fleggy...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 18, 2018
1 Like recived
- The first one matches whole lines containing 15 or more delimiters. The second one finds lines containing 14 or less delimiters. Just try them. ;) EDIT: For searching lines with delimiter count <> 15 use this (for example): ^(?!(?:[^\|\r\n]*+\|){15}[^\|\r\n§]*+§) BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 03, 2018
1 Like recived
- Hi eripey , ^(?:[^ \| \t\r\n]*+ \| ){15}.*\r\n For searching lines with less than 15 delimiters use this: ^(?!(?:[^ \| \r\n]*+ \| ){15}) BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 03, 2018
1 Like recived
- Hi, try this Perl regex, please. But you must use Notepad++ because there is a bug in UE/UES regex engine I believe. F: (?s)(?:(?<!loadURI\(").)++(http(?:(?!").)++)|.* R: \1\r\n BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 30, 2018
1 Like recived
- Hi Don, this regex is shorter and case insensitive. It matches the whole sequence of [,:.;] before the closing tag </title> and works even for the following line <title>Erodé.;</title> F: (?i)(?:[,:.;](?<![0-9A-F]{4};))+(?=</title>) R: empty BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 25, 2018
1 Like recived
- The solution by Ovg is OK but I would prefer a little more robust pattern (we don't know the upper limit for Items): F: ^(Item[^,]++,\d\d)/\d\d(/\d\d\d\d) R: \1\2 BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jan 05, 2018
1 Like recived
- Hello, if you need to search <X> followed by <Y> but not with <Z> in between then you may find useful this Perl regex with nested lookarounds: <X> (?= (?> . (?<! <Z> ) )*? <Y> ) Please don't forget that UltraEdit/UEStudio supports lookbehind with fixed length only (on writing this). BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 24, 2016
1 Like recived
- Hello, there is another way in UEStudio v14.20 and UltraEdit v21.10 (and later versions) with multi-caret feature enabled and full cut/copy/paste support with multiple carets or selections available now. Just select all required lines and then press CTRL+LMB (left mouse button) somewhere beyond end ...Posted in UEStudio General Discussion
-   Topics
-   Views
- fleggy
Apr 10, 2014
1 Like recived
- Hello, this two-pass replacement could be useful for simple refactoring. Once I needed to change many identificators in all source files so I "invented" this. I used ' { ' and ' } ' as safe delimiters but you can choose another suitable chars. These regexes work in UE19 and above (older versions do ...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 27, 2013
1 Like recived