Regular Expressions 101

Library entries

Find any URL with no trailing slash

Vote

2

Regular Expression
javascript

/
^(https?:\/\/)?(www.)?([\da-zA-z\_\-]+)\.(com|(|[\da-zA-Z]{2,6}))([\/\w \.\-\#\&\?\%\_]*)?([^\/| |\s])$
/
gmi

Description

Loading markdown...
Submitted by oneglory - 6 years ago