I have this regular expression:
/^www.example.(com|co(.(in|uk))?|net|us|me)/?(.*)?[^/]$/g
It matches:
www.example.com/example1/something
But doesn't match
www.example.com/example1/something/
But the problem is that, it matches: I do not want it to match:
www.example.com/example1/something/otherstuff
I just want it to stop when a slash is enountered after "something". If there is no slash after "something", it should continue matching any character, except line breaks.
I am a new learner for regex. So, I get confused easily with those characters
question from:
https://stackoverflow.com/questions/65934652/how-do-i-make-this-regular-expression-not-match-anything-after-forward-slash 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…