Question

1
Replies
202
Views
JavS9029 Member since 2017 4 posts
StepChange Debt Charity
Posted: 2 years ago
Last activity: 2 years ago
Closed

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***

Low-Code App Development Data Integration User Interface
Moderation Team has archived post
Share this page LinkedIn