Code King Code King - 10 months ago 46
Javascript Question

Check if valid steam profile url

I am trying to make a regex that checks if the url a user is posting, are valid.

I have created the following regex:


But that isn't working. Is there a regex master, here that can tell me what i am doing wrong?

The links i am trying to validate are looking like:




Try this regex:


See this demo:

Regex Demo

The "g" modifier is just so you can see it test it in different strings, but you probably dont need it.