How about using backslash \
in front of the square bracket. Normally square brackets match a character class.
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]
- 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?
- isnumeric() with PostgreSQL
- How do I use regular expressions in bash scripts?
- Insert commas into number string
- Regex for route matching in Express
- How can I match a pattern as long as it’s not at the beginning with regex?
- AWK: Access captured group from line pattern
- How to extract string following a pattern with grep, regex or perl [duplicate]
- Password validation regex
- Javascript regex to validate IPv4 and IPv6 address, no hostnames
- Search and replace in bash using regular expressions
- Need a regular expression – disallow all zeros
- 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
- Replace all whitespace with a line break/paragraph mark to make a word list
- Why do regex engines allow / automatically attempt matching at the end of the input string?
- How do I turn any regex into an complement of itself without complex hand editing?
- Apache mod_rewrite REDIRECT_STATUS condition causing directory listing
- Matching url with array list of words in AngularJS ui-router