I have a list of group names that all either contain prod or nonprod inside of the name. I would like to extract out the prod or nonprod from the group name for each row. Is there a regex that could do this?
Group name examples:
I would just want to extract prod/nonprod.
((?:non)?prod) ( = Start of capture group (?:non) = None capturing group for the literal string "non" ? = Zero or one of "non" prod = The literal string "prod" ) = End of capture group
Try it out at https://regex101.com/