- Save Regexctrl+s
- Update Regexctrl+⇧+s

- PCRE2 (PHP >=7.3)
- PCRE (PHP <7.3)
- ECMAScript (JavaScript)
- Python
- Golang
- Java 8

- Match
- Substitution
- List
- Unit Tests

Sponsor

Jamstack at Scale

/

((https?|ftp):\/\/)?([a-z0-9+!*(),;?&=.-]+(:[a-z0-9+!*(),;?&=.-]+)?@)?([a-z0-9\-\.]*)\.(([a-z]{2,4})|([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3})))(:[0-9]{2,5})?(\/([a-z0-9+%-]\.?)+)*\/?(\?[a-z+&$_.-][a-z0-9;:@&%=+/.-]*)?(#[a-z_.-][a-z0-9+$%_.-]*)?

/

ig

1st Capturing Group

((https?|ftp):\/\/)?

? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)

2nd Capturing Group

(https?|ftp)

1st Alternative

https?

http

matches the characters http literally (case insensitive)s

matches the character s with index 1152nd Alternative

ftp

ftp

matches the characters ftp literally (case insensitive): matches the character : with index 58_{10} (3A_{16} or 72_{8}) literally (case insensitive)

\/ matches the character / with index 47_{10} (2F_{16} or 57_{8}) literally (case insensitive)

\/ matches the character / with index 47_{10} (2F_{16} or 57_{8}) literally (case insensitive)

3rd Capturing Group

([a-z0-9+!*(),;?&=.-]+(:[a-z0-9+!*(),;?&=.-]+)?@)?

? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)

Match a single character present in the list below

[a-z0-9+!*(),;?&=.-]

+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

a-z matches a single character in the range between a (index 97) and z (index 122) (case insensitive)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

+!*(),;?&=.

matches a single character in the list +!*(),;?&=. (case insensitive)- matches the character - with index 45_{10} (2D_{16} or 55_{8}) literally (case insensitive)

This hyphen is treated literally, which might be confusing for others. Consider escaping it or placing at the start or end of the class!

4th Capturing Group

(:[a-z0-9+!*(),;?&=.-]+)?

? matches the previous token between zero and one times, as many times as possible, giving back as needed (greedy)

: matches the character : with index 58_{10} (3A_{16} or 72_{8}) literally (case insensitive)

Match a single character present in the list below

[a-z0-9+!*(),;?&=.-]

+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

a-z matches a single character in the range between a (index 97) and z (index 122) (case insensitive)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

+!*(),;?&=.

matches a single character in the list +!*(),;?&=. (case insensitive)- matches the character - with index 45_{10} (2D_{16} or 55_{8}) literally (case insensitive)

This hyphen is treated literally, which might be confusing for others. Consider escaping it or placing at the start or end of the class!

@ matches the character @ with index 64_{10} (40_{16} or 100_{8}) literally (case insensitive)

5th Capturing Group

([a-z0-9\-\.]*)

Match a single character present in the list below

[a-z0-9\-\.]

* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

a-z matches a single character in the range between a (index 97) and z (index 122) (case insensitive)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

\- matches the character - with index 45_{10} (2D_{16} or 55_{8}) literally (case insensitive)

\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case insensitive)

\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case insensitive)

6th Capturing Group

(([a-z]{2,4})|([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3})))

1st Alternative

([a-z]{2,4})

7th Capturing Group

([a-z]{2,4})

Match a single character present in the list below

[a-z]

{2,4} matches the previous token between 2 and 4 times, as many times as possible, giving back as needed (greedy)

2nd Alternative

([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3}))

8th Capturing Group

([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3}))

Match a single character present in the list below

[0-9]

{1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case insensitive)

9th Capturing Group

([0-9]{1,3})

Match a single character present in the list below

[0-9]

{1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case insensitive)

10th Capturing Group

([0-9]{1,3})

Match a single character present in the list below

[0-9]

{1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

11th Capturing Group

(:[0-9]{2,5})?

: matches the character : with index 58_{10} (3A_{16} or 72_{8}) literally (case insensitive)

Match a single character present in the list below

[0-9]

{2,5} matches the previous token between 2 and 5 times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

12th Capturing Group

(\/([a-z0-9+%-]\.?)+)*

* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data

\/ matches the character / with index 47_{10} (2F_{16} or 57_{8}) literally (case insensitive)

13th Capturing Group

([a-z0-9+%-]\.?)+

+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data

Match a single character present in the list below

[a-z0-9+%-]

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

+%

matches a single character in the list +% (case insensitive)- matches the character - with index 45_{10} (2D_{16} or 55_{8}) literally (case insensitive)

This hyphen is treated literally, which might be confusing for others. Consider escaping it or placing at the start or end of the class!

\.

matches the character . with index 46\/

matches the character / with index 4714th Capturing Group

(\?[a-z+&$_.-][a-z0-9;:@&%=+/.-]*)?

\? matches the character ? with index 63_{10} (3F_{16} or 77_{8}) literally (case insensitive)

Match a single character present in the list below

[a-z+&$_.-]

+&$_.

matches a single character in the list +&$_. (case insensitive)Match a single character present in the list below

[a-z0-9;:@&%=+/.-]

* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

;:@&%=+/.

matches a single character in the list ;:@&%=+/. (case insensitive)15th Capturing Group

(#[a-z_.-][a-z0-9+$%_.-]*)?

# matches the character # with index 35_{10} (23_{16} or 43_{8}) literally (case insensitive)

Match a single character present in the list below

[a-z_.-]

_.

matches a single character in the list _. (case insensitive)Match a single character present in the list below

[a-z0-9+$%_.-]

* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case insensitive)

+$%_.

matches a single character in the list +$%_. (case insensitive)Global pattern flags

i modifier: **i**nsensitive. Case insensitive match (ignores case of [a-zA-Z])

g modifier: **g**lobal. All matches (don't return after first match)

Your regular expression does not match the subject string.

No Match

/

/

ig

Please wait while the app is loading...