Extract parameter value from url using regular expressions

后端 未结 6 1668
抹茶落季
抹茶落季 2020-12-08 06:19

This should be very simple (when you know the answer). From this question

I want to give the posted solution a try. My question is:

How to get the parameter

6条回答
  •  醉话见心
    2020-12-08 06:54

    I know the question is Old and already answered but this can also be a solution

    \b[\w-]+$
    

    and I checked these two URLs

    http://www.youtube.com/watch?v=Ahg6qcgoay4
    https://www.youtube.com/watch?v=22hUHCr-Tos
    

    DEMO

提交回复
热议问题