FindReplace.Find(options) and regular expressions

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Joachim Schwieren
Version: 4.0.0289

I have an issue with


when using the regular expression search (defined in options).

1.) In the search text any trailing or leading blanks are ignored, e.g. " test " is treated as if I had entered "test". Why?

2.) If I enter find"this as search text, I get an exception because the string contains an unquoted ". Why do I have to quote " in here? If I enter a regex in C# code I have to quote, but not because of the regex but because of the C# syntax, e.g.

string regex = "find\"this";

But the string regex contains these unicode chars: find"this

Can you help?

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Joachim,

1) Our regular expression engine ignores whitespace. So you'd need to do \s to match a whitespace character. This is explained in the "SyntaxEditor Regular Expression Guide / Language Elements" documentation topic.

2) Similarly that topic describes the quotes as being a supported construct. It might not be a construct in the .NET regex engine, but it is in ours. So you'd need to escape quote characters to use them.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.