[tw5] Re: Regex Character Classes not working in search-replace

2021-08-07 Thread John Davis
Awesome, thanks. I had tried that but messed up the search-replace syntax, I didn't realize the angle brackets would replace the square brackets and was using both: [search-replace:i:regexp[],[$2, $1]] Much appreciated. On Saturday, August 7, 2021 at 3:42:06 AM UTC-4 saq.i...@gmail.com wrote:

[tw5] Re: Regex Character Classes not working in search-replace

2021-08-07 Thread Eric Shulman
On Saturday, August 7, 2021 at 12:24:28 AM UTC-7 john@gmail.com wrote: > I'm using a macro and search-replace to convert a list of FirstName > LastName to LastName, FirstName. It works fine with the shortcut class \w, > but if I replace that with [a-zA-Z0-9_] it breaks, when logically those

[tw5] Re: Regex Character Classes not working in search-replace

2021-08-07 Thread Saq Imtiaz
> > It works fine with the shortcut class \w, but if I replace that with > [a-zA-Z0-9_] it breaks, when logically those should be the same. You cannot have the characters [ and ] inside a literal operand to a filter operator. The workaround is to define the regular expression as a variable a