Use:
/(&|\?)list=.*?(&|$)/
Note that when you use a bracket expression, every character within it (with some exceptions) is going to be interpreted literally. In other words, [&|$]
matches the characters &
, |
, and $
.
More Related Contents:
- Regular expression to match a line that doesn’t contain a word
- Escape function for regular expression or LIKE patterns
- Case insensitive search in Mongo
- notepad++ Inverse Regex replace (all but string)
- Regular expression [ 1 ( 0 1* 0)* 1 ]* DFA
- subdomain htaccess rediect with query string
- Learning Regular Expressions [closed]
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Regex to pick characters outside of pair of quotes
- Match everything except for specified strings
- Regex whitespace word boundary
- Extract info inside all parenthesis in R
- What regex can match sequences of the same character?
- How can I match a pattern as long as it’s not at the beginning with regex?
- What does ?! mean?
- How to extract string following a pattern with grep, regex or perl [duplicate]
- What is the meaning of + in a regex?
- Extract substring using regexp in plain bash
- Password validation regex
- Javascript regex to validate IPv4 and IPv6 address, no hostnames
- Search and replace in bash using regular expressions
- What’s wrong with my lookahead regex in GNU sed?
- Regex capitalize first letter every word, also after a special character like a dash
- Regular expression to remove one parameter from query string
- Sed to extract text between two strings
- Swift 3 – How do I extract captured groups in regular expressions?
- Redirect all traffic to root of another domain
- ignoring changes matching a string in git diff
- ElasticSearch and Regex queries
- Regex allow digits and a single dot