Problem with Regex Find/Replace

SyntaxEditor for Windows Forms Forum

Posted 15 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
I get the following exception when doing a regex find+replace with the following:

Running a find replace with the following....
Find What \n{Set@LastTime.+}\n

-----------------------------

Exceptions

Top Level Exception
Type: ActiproSoftware.SyntaxEditor.InvalidRegexPatternException
Message: An invalid character 'S' was found in a range specification.
Source: ActiproSoftware.SyntaxEditor
Stack Trace: at _37._1(_35 )
at _37._1(_35 , _35 )
at _37._1(Int32 , Boolean )
at _37._1(Int32 , Boolean )
at _37._1(String , Boolean , Boolean , LexicalMacroCollection ,
CaseSensitivity )
at ActiproSoftware.SyntaxEditor.FindReplaceOptions._1()

Any ideas on why this might be happening?

Thanks,

Ashton

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, that is not valid regex grammar. A { } is used for range specification, like:
abc{1,2} = means between 1 and 2 times

If you are trying to do iteration, it works like this:
(abc)* = 0 or more
(abc)+ = 1 or more


Actipro Software Support

The latest build of this product (v21.1.0) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.