Page 1 of 1

Regex engine

Posted: Wed Jul 23, 2003 8:50 am
by an
It is great having Regex functionality in the search and the replace functionality. It's something I use a lot, especially as the replace allows undo as it sometimes takes me a few goes to get the expressions right :)

I realise that there is a set of character class operators eg [:word:] and we have the \< \> anchors but I'd find it useful if the Regex engine also supported some other metasequences that are common in other engines...


\b Matches a word boundary, such as a space. "ea*r\b" matches the "er" in "never early."
\B Matches a nonword boundary. "ea*r\B" matches the "ear" in "never early."
\d Matches a digit character. Equivalent to [0-9].
\D Matches a nondigit character. Equivalent to [^0-9].
\s Matches any white space including space, tab, form-feed, and so on. Equivalent to [ \f\n\r\t\v]
\S Matches any nonwhite space character. Equivalent to [^ \f\n\r\t\v]
\v Matches a vertical tab character.
\w Matches any word character including underscore. Equivalent to [A-Za-z0-9_].
\W Matches any nonword character. Equivalent to [^A-Za-z0-9_].

Cheers,
Andrew

Posted: Mon Jul 28, 2003 7:47 am
by csalsa
Hi checkout the poll
Add support for Perl5/JavaScript regular expressions

I think it what you want.

Posted: Mon Jul 28, 2003 8:16 am
by an
Thanks. I didn't spot it as I only searched for Regex.

Posted: Tue Aug 05, 2003 2:12 pm
by melvers
I would like to see a meta-control that you could use to specify the starting column of the subsequent text. Quite often I need to format files to align columns and I can't use the find-replace because I don't have that capability.