Regex named group in different locations

Viewed 21

I need a regex pattern to catch pattern in different optional locations.

Let me explain in an example:

Test strings:

x-test
y-test
z-test
test-t

I need to capture x,y,z,t in same named group

Please check it from here:

https://regex101.com/r/Zui48R/1

0 Answers
Related