With RegEx in a pattern, how do you extract multiple values?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 03:31 AM
Could someone please provide an example of using the parse file operation with RegEx to run multiple RegEx expressions in order to build a table? For example, how could I use RegEx to pull back multiple values from the config.xml file on the MID server host in a single Parse File step and store them in a table of variables?
The docs site says to enclose each expression in parentheses, but I've not been able to get that to work.
"To extract multiple values, define several expressions enclosing each expression into parentheses."
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 09:09 AM
can someone help me parse the database name, alias and local directory in three variables from below text. This is the output of Parse Command output operation in pattern designer.
Database alias = abcd
Database name = abcd
Database directory = /a/b/c/d
Database alias = abcd2
Database name = abcd2
Database directory = /a/b/c/d2
Database alias = abcd2
Database name = abcd2
Database directory = /a/b/c/d2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 09:47 AM - edited 07-08-2025 09:48 AM
Hi @NirmalSharma9 ,
Have you tried using delimited text strategy? Please find the below screenshot.
Regards,
Srinija
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2025 10:50 AM
I tried, when I do so it selects the content in weired way and it does not work. It auto captures a lot of text and while setting position 1 to any other number it still catpures muptiline words based on the space as delimeter. I tried delemeter as = as well but again still still takes word from all 5 lines and store in single variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 06:47 AM
Hi @NirmalSharma9 ,
Below are my thoughts,
Approach 1:
If the data output is in XML format, it becomes much easier to extract multiple values without relying heavily on delimiters or regular expressions.
Approach 2:
You can first parse the entire output into a single variable, and then extract the required data using either regular expressions or a delimiter-based approach. Once all necessary values are extracted, use the Transform Table option to combine these columns into a one final table.
Regards,
Srinija
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 06:57 AM
@cloudyrobert @Try with this
<name>(.*?)</name>[\s\S]*?<version>(.*?)</version>[\s\S]*?<ip>(.*?)</ip>
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain