Question
· Sep 4

Regex search for Z09 or any string of A-Z followed by 0-9 0-9

..Contains(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"(")&&..Matches(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"^[A-Z][0-9][0-9]$")

I want to do this to match strings such as X98. Community AI tells me this is correct but I get an error in testing. Specifically, this is the part causing the error;
..Matches(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"^[A-Z][0-9][0-9]$")


What do I need to change?

Product version: IRIS 2025.1
Discussion (1)2
Log in or sign up to continue

The Matches() method in the DTL and Routing Rule function list does not use regex syntax; it uses COS "?" pattern matching. The pattern you'd need for your specific example is "1A2N" for 1 alpha character followed by 2 digits.

There's also a ..RegexMatch() method for the DTL and Routing Rule editors in most modern versions of IRIS. That accepts most pcre regex patterns.