- Save Regexctrl+s
- Go to library entry

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

- Match
- Substitution
- List
- Unit Tests

Sponsor

Jamstack at Scale

/

^(?<date>\d{4}\-\d{2}\-\d{2}\s+)(?<time>\d{2}\:\d{2}\:\d{2}\s+)(?<sip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(?<csmethod>.+?\s+)(?<csuristem>.+?\s+)(?<csuriquery>.+?\s+)(?<sport>\d{1,3}\s+)(.+?\s+)(?<cip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(?<csUseragent>.+?\s+)(?<scstatus>\d{1,3}\s+)(?<scsubstatus>\d{1,3}\s+)(?<scwin32status>\d+\s+)(?<scbytes>\d+\s+)(?<csbytes>\d+\s+)(?<timetaken>\d+)?$

/

^ asserts position at start of the string

Named Capture Group date

(?<date>\d{4}\-\d{2}\-\d{2}\s+)

\d

matches a digit (equivalent to [0-9]){4} matches the previous token exactly 4 times

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

\d

matches a digit (equivalent to [0-9]){2} matches the previous token exactly 2 times

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

\d

matches a digit (equivalent to [0-9]){2} matches the previous token exactly 2 times

\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

Named Capture Group time

(?<time>\d{2}\:\d{2}\:\d{2}\s+)

\d

matches a digit (equivalent to [0-9]){2} matches the previous token exactly 2 times

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

\d

matches a digit (equivalent to [0-9]){2} matches the previous token exactly 2 times

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

\d

matches a digit (equivalent to [0-9]){2} matches the previous token exactly 2 times

\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

Named Capture Group sip

(?<sip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)

\d

matches a digit (equivalent to [0-9]){1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

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

\d

matches a digit (equivalent to [0-9]){1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

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

\d

matches a digit (equivalent to [0-9]){1,3} matches the previous token between 1 and 3 times, as many times as possible, giving back as needed (greedy)

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

\d

matches a digit (equivalent to [0-9])\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)

Named Capture Group csmethod

(?<csmethod>.+?\s+)

.

matches any character (except for line terminators)+? matches the previous token between one and unlimited times, as few times as possible, expanding as needed (lazy)

\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group csuristem

(?<csuristem>.+?\s+)

.

matches any character (except for line terminators)+? matches the previous token between one and unlimited times, as few times as possible, expanding as needed (lazy)

\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group csuriquery

(?<csuriquery>.+?\s+)

.

matches any character (except for line terminators)+? matches the previous token between one and unlimited times, as few times as possible, expanding as needed (lazy)

\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group sport

(?<sport>\d{1,3}\s+)

\d

matches a digit (equivalent to [0-9])\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])8th Capturing Group

(.+?\s+)

.

matches any character (except for line terminators)\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group cip

(?<cip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)

\d

matches a digit (equivalent to [0-9])\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case sensitive)

\d

matches a digit (equivalent to [0-9])\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case sensitive)

\d

matches a digit (equivalent to [0-9])\. matches the character . with index 46_{10} (2E_{16} or 56_{8}) literally (case sensitive)

\d

matches a digit (equivalent to [0-9])\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group csUseragent

(?<csUseragent>.+?\s+)

.

matches any character (except for line terminators)\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group scstatus

(?<scstatus>\d{1,3}\s+)

\d

matches a digit (equivalent to [0-9])\s

matches any whitespace character (equivalent to [\r\n\t\f\v ])Named Capture Group scsubstatus

(?<scsubstatus>\d{1,3}\s+)

Named Capture Group scwin32status

(?<scwin32status>\d+\s+)

Named Capture Group scbytes

(?<scbytes>\d+\s+)

Named Capture Group csbytes

(?<csbytes>\d+\s+)

Named Capture Group timetaken

(?<timetaken>\d+)?

$ asserts position at the end of the string, or before the line terminator right at the end of the string (if any)

Your regular expression does not match the subject string.Try launching the debugger to find out why.

/

/

Please wait while the app is loading...