I have a string that looks like
/home/user/one.jar:/home/user/two.jar:/home/user/three.jar:/home/user/four.jar
how would I write a regex to match paths containing "two.jar" or "three.jar" so I can filter out these paths later to finally get
home/user/one.jar:/home/user/four.jar?
I tried ^:.*(two|three)\.jar:$ to basically say
- Match any string that begins with
: - Has any number of characters in between (to match paths like
/home/user/ - Match by either "two.jar" or "three.jar"
- Ends with
:
but I don't think I'm approaching this correctly