RegexPatternGroup and Casesensitivity

SyntaxEditor for Windows Forms Forum

Posted 19 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 19 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 19 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 19 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 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It's case-sensitive. Try AutoCorrect instead of Autocorrect.


Actipro Software Support

Posted 19 years ago by Ajay
Avatar
AutoCorrect does not work either.
Posted 19 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 (v24.1.0) 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.