Code King Code King - 2 years ago 142
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:



Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download