RegexPatternGroup and Casesensitivity

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Ajay
Avatar
The documentation says that the value for casesensitivity attribute in the RegexPatternGroup Tag can be Sensitive, Insensitive, or AutoCorrect. If I use AutoCorrect, I am getting an exception. Can you please check ?

Comments (6)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It should work fine... we use it for the VB sample language definitions. What is your exception?


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It should work fine... we use it for the VB sample language definitions. What is your exception?


Actipro Software Support

Posted 14 years ago by Ajay
Avatar
The exception says :
A CaseSensitivity setting of 'Autocorrect' is not permitted on regex lexical pattern groups.

This is what I had in my language definition file :

<Macro Key="ACLGROUPKeywords" Value="((NOT)|(DENY)|(ALIAS)|(NETUNDERLYING)|(UNDERLYING))*" />

<RegexPatternGroup TokenKey="ReservedWordToken" CaseSensitivity="Autocorrect" PatternValue = "{ACLGROUPKeywords}" Style="ReservedWordStyle" LookAhead="{NonWordMacro}"/>
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It's case-sensitive. Try AutoCorrect instead of Autocorrect.


Actipro Software Support

Posted 14 years ago by Ajay
Avatar
AutoCorrect does not work either.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I apologize, I didn't notice that you were using regex pattern groups. Yes, auto-correct will only work on explicit pattern groups.

The reason is that regex pattern groups can have multiple character cases like this a[bB]c and in that case, SyntaxEditor wouldn't know what character (b or B) to auto-correct with.


Actipro Software Support

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.