SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: b on November 19, 2015, 08:37:36 pm

Title: Change in vim cua regex
Post by: b on November 19, 2015, 08:37:36 pm
It appears that in the vim CUA command mode that the regex parser is inconsistent or changed.
(v20.0.0.12/Hotfix 1)

I'm changing a bunch of printf functions to a debug function, but I don't want to change the fprintf routines

I can perform a search as /\<printf and it finds the matches
However, if I try to search and replace, it finds no match  :%s/\<printf/debug/

Yet, :%s/\bprintf/debug/ works (Perl regex).  But if I try searches with the Perl regex /\bprintf does not.

It appears that one is still using the vim regex, and the other is using the perl regex.

Is this a bug or is there some other configuration change I need to make them consistent?
Title: Re: Change in vim cua regex
Post by: Clark on November 19, 2015, 10:11:46 pm
\< is not longer supported. use \o< instead. This change was made to improve compatibility with Perl.

/\bprintf works for me. No change here.
Title: Re: Change in vim cua regex
Post by: b on November 21, 2015, 12:50:42 am
I'm two for two today.   Now /\b<string> is working where I had tried it several times before and it hadn't.   

Thanks for the alternate.  What is the \o ??  old?

Title: Re: Change in vim cua regex
Post by: Clark on November 21, 2015, 01:06:36 am
\o does not stand for old. It stands for option. We simply needed a way to add extensions without conflicting with Perl options or messing up how to fully escape a regex string (can't use \ followed by non-alpha character).