HNegi Member since 2015 1 post
Posted: 7 months ago
Last activity: 7 months 2 weeks ago

Regex Causing the Email Activity to go in loop


We are using a regular expression to validate the attachment names before attaching the same in pega.

But some time while validating the name the listner activity is going in infinite loop.

Regex used: [0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\*\\!\\?\\ \\(\\)\\_\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$


Pega function which we are using 

@pxContainsViaRegex(Param.Filename,"[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\*\\!\\?\\ \\(\\)\\_\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$",.pySelected)

if value of pySelected is true it means file name is per regex


what we are evaluating via regex.

1. Document Name should start with either number (0-8) or English alphabets (a-z)(A-Z).

2. should only have a specific set of special characters which are there in regex

Name which is causing expression to go in loop example: "Medium priority:  Lease update for EST-TAL-001-SO01 - EST-TAL-SAS Institute OÜ (3267)"



Himanshu Negi


Pega Platform 8.3 Low-Code App Development Admin Studio Other Industry System Architect
Share this page LinkedIn