Posted 15 years ago by Marianne
Avatar
Two questions:
#1 - Does the regex engine support the \r\n escapes in find/replace? I would like to be able to add cr/lf sequences in some scripts, and to remove them in others. I'm not able to get the find/replace to operate on \r\n at all. It doesn't seem to be able to find the characters.

#2 - For replacing, how do I reference a pattern match? For example, normally if I wanted to add a cr/lf to the end of every closing xml tag, the match would be:
(</\w+> ) and the replacement would be: $1\r\n

What syntax do I need to allow for this? Or is this something that the regex engine doesn't account for at present? Thanks.

------------------------------- Marianne

Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can do linefeed searches but remember that internally \r (cr) is stripped out. So searching on \n will work fine with regexs but any use of \r will never match.

The regex engine currently doesn't support capturing. I'll put it on the TODO list.


Actipro Software Support

Posted 15 years ago by Eric J. Smith
Avatar
I second the regex replace feature request. Being able to do a regex find/replace is a very powerful feature.

Thanks,
Eric J. Smith
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.