UltraEdit has support for 3 different regular expression engines:
- Perl ... the most powerful regexp engine using Boost Perl regexp library.
- UltraEdit ... the native regexp engine of UltraEdit with syntax like in Microsoft Office.
- Unix ... UltraEdit regexp engine with Perl regexp syntax (more or less).
The IDM power tip tagged expressions explains the usage of marking/capturing/tagging groups on running an UltraEdit regular expression replace.
The IDM power tip Perl regular expressions: Backreferences explains the usage of marking/capturing groups on running a Perl regular expression replace. This syntax can be also used for legacy Unix regexp engine with limited capabilities.
[
...]
defines a character class/set, i.e. a list of characters. Any character within the square brackets can or must be found for a positive search. Using a character set does not make much sense for a single character like '
and ,
. It is possible to use ['][\d]+['][,][']
, but it is much easier to use as search string '\d+','
.
Please note that the escape sequence \d
in a Unix/Perl regexp search string defines a characters set for any digit. The equivalent in an UltraEdit and by chance also in Unix/Perl regexp search string is [0-9]
.
The replace can be done with search string '^([0-9]+^)','
and replace string ^1,'
on using UltraEdit regular expression engine.
The replace can be done with search string '(\d+)','
and replace string \1,'
on using Unix or Perl regular expression engine.
With the Perl regexp engine it is also possible to use for this replace the search string '(\d+)'(?=,')
with replace string \1
because of ,'
is specified in a positive lookahead which does not match/select characters.