I have generated the following regular expression in a project I am working on, and it works fine, but out of professional curiosity I was wondering If it can be ‘compressed/shortened’:
/[(]PRD[)].+;.+;.*;.+;.+;.*;.*;.*;/
Regexes have always seemed like voodoo to me…
For starters, the single-character blocks can just go away:
Next, you can group the related items together:
This actually makes it textually longer, though.