Answer the question
In order to leave comments, you need to log in
How to regex indicate end of line or question mark?
I'm trying to parse a folder ID in a Google Drive link.
Link Example
https://drive.google.com/drive/folders/1q5nL2z8yKS-0qvmlt9Jtq8u3iFgsu-ea
https://drive.google.com/drive/folders/1q5nL2z8yKS-0qvmlt9Jtq8u3iFgsu-ea?usp=sharing
^(?:https?:\/\/)?(?:www\.)?(?:drive\.google\.com\/drive\/folders\/)(.+)$
Answer the question
In order to leave comments, you need to log in
Tried adding something like (\?|\$) - doesn't work.
What to feed him there?
(.+?)(\?|$)
^(?:https?:\/\/)?(?:www\.)?(?:drive\.google\.com\/drive\/folders\/)(.+)[\?\$]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question