Regular Expressions 101

Remove leading "http://" or "https://" and optionally a "www."

Open Workspace
  • JavaScript
  • Match
0

Regular Expression

/
^https?:\/\/(www\.)?
/
g

Description

Remove leading "http://" or "https://" and optionally a "www ." for look up

Submitted by Anonymous