GauravB1

Ensign
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-14
11:26
140 views
Need help with changing variable regex
I'm trying to parse a message that is either empty or has a value. The message is \"phones\": \"\" and it changes when there's a value between the quotes for instance \"phones\": \"xxxx\"
\\"phones\\": \\"([^\\]+)\\" --> this doesn't parse after the second quotation.
\\"phones\\": \\"?([^\\]+)\\" --> this parses but includes the second quotation in the value column.
I need it to stay empty if there's no value and if there's a value I need to pick the value without the quotation marks.
Would appreciate any assistance.
1 Reply
mrksr

Vice Admiral
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-01-15
07:12
you can probably use "conditional mappings" to solve this.
Look for "conditional mappings" in "FlexConnector Developer's Guide".
With conditional mappings you can do something like
'if token = "\" map empty value to field'