Hi Pete,
this is a known bug in UE'S Perl regex engine. Positive lookaround is broken - searches work, replaces don't (funnily enough, the replace dialog tells you that it did perform
n replaces and also marks the file as changed, but it doesn't actually do anything... negative lookaround works fine, by the way.
I have written to IDM support several times about this ; they have been confirming the problem each time and said they'd have their technicians look into it. Maybe it'll get boosted on the list of priorities if you send them a mail at
support@idmcomp.com - I'd really appreciate it.
As a workaround, and since
negative lookaround does work, the following regex works on your sample data; make sure, though, that it won't produce unwanted matches with your actual data:
- Code: Select all
(?!<\W) (?!\D)
HTH,
Tim
edit: Hi Bego, you were faster than me; your regex will work too (but slower), and the * should probably be replaced by a + or else it will also replace "B2B" by "BXX2B"...