I have those string examples (starts with a specific string: (ex: S and then, it is snake case separated by . and sometimes followed by ()):
T.name.other_name.another_name
T.name.again_name.ect_name.last_name()
I'm trying to use a RegExp to match all the snake case parts (without the .) but not the last one if it is followed by ().
So the matches should be:
name other_name another_name
name again_name etc_name (and not last_name).
But I cannot manage to find one. How can I do that?
If the matches include the . that is fine too:
name.other_name.another_name
name.again_name.ect_name (but not .last_name())
I tried this regexp:
T((\.([a-z]|\_)*)*)(\.([a_z]|\_)\(\))?
and wanted to extract the 2nd group match, but it always includes last_name.
