Say I have a complex barcode which need to be validated and then parsed, I could do this using a standard regex match string which describes groupings. Tulip at present seems not be able to either extract all matches (i.e. “global match”) or match groups in particular - unless there is an undocumented trick.
Example input string:
A:4711;B:;C:abcd;D:efghi;E:15548;F:
Example regex:
/^A:([^;:]+)?;B:([^;:]+)?;C:([^;:]+)?;D:([^;:]+)?;E:([^;:]+)?;F:([^;:]+)?$/g
I would like to a) validate that the incoming string matches the expected format and has all the expected keywords, and then b) extract the values of each so I can properly reference them in an app without the need to go via a custom widget or other tinkering.
As a workaround I am able to achieve the expected outcome by chaining a Regex match for each of the keywords separately, storing them in an array and then extracting the first element of the resulting array in order to store it in the actual object key/value pair.