- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2018 03:14 PM
Has anyone been able to successfully get the Global (/g) switch to work successfully in Pattern Designer for a RegEx parsing strategy?
If I write a pattern that successfully is iterated using the Global switch and it tests correctly in a tool like Regexr, that same pattern won't match on subsequent iterations when I try with /g in the Pattern Designer.
I am trying to build a tabular variable and would like an additional row for each match of the pattern
Thanks!
Sean
Solved! Go to Solution.
- Labels:
-
Discovery
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2018 10:59 PM
Hi,
Unfortunately the global switch is not supported, and the expression matchs each line separately.
The good news are that it is on the road map as a future enhancement.
If you are populating a table it will iterate through the entire text and add new table row for each successful (non global) match.
in order to globally match the entire text, you should write a pattern step with an eval statement and implement a simple java script that will run regexp match with any required flags.
Hope this helps.
If it does please mark if helpful and share your results.
Asi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2018 10:59 PM
Hi,
Unfortunately the global switch is not supported, and the expression matchs each line separately.
The good news are that it is on the road map as a future enhancement.
If you are populating a table it will iterate through the entire text and add new table row for each successful (non global) match.
in order to globally match the entire text, you should write a pattern step with an eval statement and implement a simple java script that will run regexp match with any required flags.
Hope this helps.
If it does please mark if helpful and share your results.
Asi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2018 05:58 AM
ASI that's a great idea however I've never been able to access and return a Tabular variable through EVAL scripting. Do you have an example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2018 02:27 PM
Asi thank you this was very helpful!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 10:47 AM
Hi Sean, thanks for the feedback.
Just mark it as helpful 🙂