Forum Discussion
Need help with Regex
If there can only be a single instance of the account number, then you could keep it simple using
starts with 'o' and does not contain a comma.
If you need to more robustly match your account numbers, then you'd need to be more specific with the rules, but given what you've said already, something like this should work.
^o[a-z]{3}-[0-9A-Z]{8,10}$
Using the start and end of string characters (^ and $) to make sure there was only one instance.
If you had a list of things that should match and things that should not, I can probably better refine what you're looking for.
(and as David said, it's a starting point for a conversation.)
Thank you very much, much appreciated bob , the reegx helps to identify the product in the string, which is great but the challenge when there are multiple products i.e. account numbers listed in the string. Don't think I can use the filter starts with 'o' as the target attribute account_active is a custom attribute and not within a nested object (in which case I could have used multi-criteria segmentation where account_active starts with 'o' AND matches regex ^o[a-z]{3}-[0-9A-Z]{8,10}$
Cheers
Raj
Related Content
- 2 years ago
- 3 years ago