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

Find, replace, find in files, replace in files, regular expressions
5 posts Page 1 of 1
Hi,

I am using UE for a long time. Recently i have updated it to 24. After the update, it seems UE macro has problem with ^s and ^c. Below is my sample macro which is working pretty good on older versions and not working on the latest.

Code: Select all
InsertMode
ColumnModeOff
HexOff
IfSel
PerlReOn
Clipboard 4
Copy
Find RegExp SelectText "([a-z&;])([a-z&;']+) ([a-z&;])([a-z&;'\-]+)"
Replace All "\3\4 \1."
IfFound
Find MatchCase RegExp SelectText "([a-z])\."
IfFound
Find MatchCase RegExp SelectText "([a-z])\."
Replace All "\U\1\E."
EndIf
Clipboard 4
Find "^c"
Replace All "^s"
EndIf
ClearClipboard
Clipboard 0
EndIf

Sample for macro:

Code: Select all
Sample Name
Sample Name
Sample Name
Sample Name

Use of macro:

If I select "Sample Name" and run the macro it has to convert selected "Sample Name" into "Name S." and replaces all the following occurrences also by "Name S.".

This macro just find the text in clipboard and replaces it with nothing, i.e. the ^s is not working as expected.
This is a small part of my macro and i submitting this for testing.
Am I missing anything?
I confirm this wrong behavior. This is caused by bug of UltraEdit in the versions 24.00.0.42 to 24.10.0.24.

I verified this bug with the following procedure.

  1. Created an ASCII/ANSI file using code page Windows-1252 with the lines:

    Name S.
    Sample Name
    Sample Name
    Sample Name

  2. Selected Sample Name in second line and copied this string to clipboard with Ctrl+C.
  3. Pressed Ctrl+Home and Shift+End to select Name S. in first line.
  4. Pressed Ctrl+R and replaced the preselected search string Name S. by ^c and entered ^s as replace string.
  5. Executed the non regular expression Replace all.
In UE v22.20.0.49 and v23.20.0.43 the result is as expected:

Name S.
Name S.
Name S.
Name S.

In UE v24.00.0.42 and v24.00.0.45 the result is a message box informing the user Search string 'x' not found whereby x is not Sample Name, but an Asian character which means the ANSI string in clipboard is interpreted somehow wrong as Unicode string.

And in UE v24.00.0.49 to v24.10.0.24 the string in clipboard is found, but replaced with nothing because the selected string is not correct read from file.

Please report this bug to IDM support by email. I do that, too.
Best regards from Austria
Thanks for your reply. I will surely notify the bug.
This bug is fixed with UltraEdit for Windows v24.10.0.32 and with UEStudio v17.10.
Best regards from Austria
Thanks Mofi, for your reply.
5 posts Page 1 of 1