I have a pretty basic regex for a soundcloud link as follows:
/^(https?:\/\/)?((www)?\.)?soundcloud\.com\/[a-zA-Z0-9]*/
It doesn't do much and I would like to block that kind of more complicated links that contain something else (?fbclid=) than only valid soundcloud information:
Invalid:
https://soundcloud.com/beat-one/done-lam/w-avlwV?fbclid=IwAR8TyDI-1ezXHrP1BfaBG1rLP8gTlEQeGJzKO0DGZl7h1i63VWqenV_yDI8
Valid:
https://soundcloud.com/beat-one/done-lam/w-avlwV
How can I do it?
Thanks!
^(https?:\/\/)?((www)?\.)?soundcloud\.com\/(?!.*\?fbclid=).*$regex101.com/r/NRxwHz/1 Note that as www is optional is could also match .soundcloud?character?