Using rex to delete everything in the url after the & ampersand
Posted: Wed Nov 11, 2020 4:46 pm
I have a urls like these:
https://www.youtube.com/watch/?v=XuTwtO ... ng_pref=de ret=XuTwtOo88r8
https://www.youtube.com/watch/?v=XuTwtOo88r8
https://www.youtube.com/watch/XuTwtOo88r8
I'm using this:
<sandr "https://www.youtube.com/watch/\?v\=" "" $ShowURL>
<sandr "https://www.youtube.com/watch/" "" $ret>
but i need to remove all of the url after the &,
&cc_load_policy=1&cc_lang_pref=de ret=XuTwtOo88r8
I assume I need a rex for the last part but I'm unsure how to write it.
I tried <rex ">>[^&;]*" $ret> but it doesn't work.
Can you please advise me. Thanks
https://www.youtube.com/watch/?v=XuTwtO ... ng_pref=de ret=XuTwtOo88r8
https://www.youtube.com/watch/?v=XuTwtOo88r8
https://www.youtube.com/watch/XuTwtOo88r8
I'm using this:
<sandr "https://www.youtube.com/watch/\?v\=" "" $ShowURL>
<sandr "https://www.youtube.com/watch/" "" $ret>
but i need to remove all of the url after the &,
&cc_load_policy=1&cc_lang_pref=de ret=XuTwtOo88r8
I assume I need a rex for the last part but I'm unsure how to write it.
I tried <rex ">>[^&;]*" $ret> but it doesn't work.
Can you please advise me. Thanks