Integer Pattern

Posted 8 years ago by Avatar Syed Sadaqat - Sr. Software Engineer, SSI
Integer pattern in case of dot(.) is not working properly.
Following is the RegexpatternGroup.

<RegexPatternGroup TokenKey="IntegerNumberToken" Style="NumberStyle" LookAhead="{NonWordMacro}|\z" LookBehind="{NonWordMacro}">

<RegexPattern Value="[\+\-]? {DigitMacro}+ (\. {DigitMacro}+)?" />


It works nice when I write 2.33 and color of text is changing like decimal as I provided. But then I write A2.33 or 2.33A the color of numeric values after dot(.) is not changing. It should change to text color instead of numeric color.
Thanks, Syed Sadaqat

Comments (3)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA

Look at the LookBehind and LookAhead patterns you have set. This pattern will not match if those cases are specified and are not found to be true. Your LookBehind is requiring that a non-word character (non-alpha or digit) is being before the pattern start, and your LookAhead is requiring that either a non-word character or end of doc is after the pattern. If either of those conditions fail, the pattern will not match.

Actipro Software Support
Posted 8 years ago by Syed Sadaqat - Sr. Software Engineer, SSI
Thanks for reply,
Please suggest me pattern.
Thanks, Syed Sadaqat
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
If you'd like us to look at it you'd need to email us a simple dynamic XML definition that shows the issue. Also include the example text to show it in the ExampleText of the definition. You can email that to our support address with steps on what you expect to see. My guess is that perhaps you have other pattern groups that are coming into play here.

Actipro Software Support
Information The latest build of this product (2016.1 build 0330) was released 2 years ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.