User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Find, replace, find in files, replace in files, regular expressions
18 posts Page 2 of 2
If the "parenthesis" regexes work for you and also same rules are valid for those hex codes then it should be not difficult to rewrite them to a "hexa" variants.
Hi Fleggy,

The final solutions that you posted are crashing my UEStudio for some reason when I use it in a macro. So I was using your earlier replace combinations given below

Code: Select all
1) Repeat until nothing is replaced.

Find what: (?s)(?<=<(italic)>)(\(((?>(?:(?:(?![()])(?!</?(?!WRK)\b).)++(?:<((?!WRK)[^>]++)>(((?>(?:(?!<\4\b)(?!</\4\b).)++|<\4\b[^>]*+>(?5))*+)</\4>))?)|(?2))*+)\))(?=</\1>)
Replace with: ~~\3~~

2) Repeat until nothing is replaced.

Find what: (?s)\(((?>(?:(?:(?![()])(?!</?(?!WRK)\b).)++(?:<((?!WRK)[^>]++)>(((?>(?:(?!<\2\b)(?!</\2\b).)++|<\2\b[^>]*+>(?3))*+)</\2>))?)|(?R))*+)\)
Replace with: ^[^\1^]^

3) Final replacements:

F: (<italic>)(?:\(|~~)
R: (\1

F: (?:\)|~~)(</italic>)
R: \1)

F: \^\[\^
R: (

F: \^\]\^
R: )

And it seems to work fine as of now. Can you tell me why you wanted to update these replace sequences?
Is there a chance that using it might replace something wrong and modify/delete any text?
I'm a bit hesitant using it. :?
Thanks in advance. :)
Hi Don,

it is almost sure that UES crashes because of named backreferences in the replace patterns. I've already sent an error report to IDM. You can try this simple workaround: use the more complex find patterns and change the first and second replace pattern to

The reason why I updated these regexes is simple. The updated versions are not influenced by unbalanced parenthesis in nested tags potentially found between <italic> and </italic>.

<italic>(changes <xref ...">(6))</xref> from VB 6)</italic>

BR, Fleggy
18 posts Page 2 of 2