dyarosh
2 days agoQrew Member
Extracting multiple substrings from a text string
I have a text string that contains data similar to the following:
Company Name 1 | P25021201 - 4341297 | stp01YWTFMSXKS5f6u2z | $1200.00 | Company Name 2 | P25021201 - 4341112 | stp01RFEQRMDTC5f6u0l | $2400.00 | Wallet
I need to extract the data that starts with "stp" and return it in the following format: stpxxxx1, stpxxxxx (i.e. stp01YWTFMSXKS5f6u2z, stp01RFEQRMDTC5f6u0l
The problem is the number of "stp" strings in the text is unknown. Does QB support a looping mechanism? If yes, I could simply find the 1st stp string, remove it from the text string and keep looping until no more stp strings are found.
Any help with this is greatly appreciated as it is causing an issue with a production app.