I am new to RegEx, and it seems very confusing to me. I need to create a regex pattern to loop through a list of strings, and one by one check if the strings match at least one of a list/set of patterns.
I.e. I would for example have a list of patterns:
- Starts with Abc and ends with 123
- Starts with Cde and ends with 234
- Starts with Efg and ends with 345
I would have to create a regex expression (built in code, at runtime) that can be used to check each string in a list of strings one at a time to see if it matches pattern 1, pattern 2 or pattern 3 etc
Could anyone please give me a hint (or even better the solution) to this problem?