It’s a negative lookahead, which means that for the expression to match, the part within (?!...)
must not match. In this case the regex matches http://
only when it is not followed by the current host name (roughly, see Thilo’s comment).
More Related Contents:
- Learning Regular Expressions [closed]
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Regular expression for floating point numbers
- RegEx for matching UK Postcodes
- Can’t escape the backslash with regex?
- Regex to match URL
- Regex (grep) for multi-line search needed [duplicate]
- Match whitespace but not newlines
- Extracting a string between other two strings in R
- Regular expression for matching HH:MM time format
- What is the difference between square brackets and parentheses in a regex?
- How do I grep for all non-ASCII characters?
- How do I use regular expressions in bash scripts?
- Random string that matches a regexp [duplicate]
- Insert commas into number string
- Insert contents of a file after specific pattern match
- Regular Expression: Numeric range [duplicate]
- Regex: match pattern as long as it’s not in the beginning
- How can I make my match non greedy in vim?
- How to extract string following a pattern with grep, regex or perl [duplicate]
- What is the meaning of + in a regex?
- Password validation regex
- Javascript regex to validate IPv4 and IPv6 address, no hostnames
- Search and replace in bash using regular expressions
- Regex capitalize first letter every word, also after a special character like a dash
- Regular expression to extract whole sentences with matching word
- Sed to extract text between two strings
- Find all string matches with Regex golang
- Remove all characters before a period in a string
- powershell extract text between two strings