regexp - using repetition specifier in embedded user function
I'm trying to use "similar to" operator in an embedded user function, below is a simplified example:
case
when colName similar to '[a-zA-Z][a-zA-Z][0-9]{3,4}' then colName
else null
end
the problem is pega treats '{}' as a parameter place holder, I need pega to see it as a regexp repetition specifier, if i escape it i.e.
'[a-zA-Z][a-zA-Z][0-9]\{3,4\}'
then pega wont complain- but that is not the correct regexp.
I could use separate expressions i.e. '[a-zA-Z][a-zA-Z][0-9][0-9]([0-9]|(0-9][0-9]))'
but would like to know if its possible to use the repetition operators (i'm hoping i just need to escape it somehow ??)
***Updated by moderator: Lochan to update platform capability***