Making a non-capturing, zero to more matching group, you must append ?
.
(?: ..... )?
^ ^____ optional
|____ group
More Related Contents:
- Regex for this {{mike}} {{michael}} {{jordan}} [duplicate]
- What is a non-capturing group in regular expressions?
- RegEx for matching UK Postcodes
- Negating a backreference in Regular Expressions
- Can I use an OR in regex without capturing what’s enclosed?
- Guide on how to use regex in Nginx location block section?
- Regex to validate date formats dd/mm/YYYY, dd-mm-YYYY, dd.mm.YYYY, dd mmm YYYY, dd-mmm-YYYY, dd/mmm/YYYY, dd.mmm.YYYY with Leap Year Support
- Regular expression for floating point numbers
- Can’t escape the backslash with regex?
- Regex to match URL
- 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
- Insert commas into number string
- regex to match a word with unique (non-repeating) characters
- Is it possible to define a pattern and reuse it to capture multiple groups?
- Regular expression to match last number in a string
- What are the differences between glob-style patterns and regular expressions?
- Regex for comments in strings, strings in comments, etc
- Matching math expression with regular expression?
- How do I handle special characters in a Perl regex?
- Can a URL contain a semicolon and still be valid?
- Regular expression to extract whole sentences with matching word
- Case insensitive search in Mongo
- Find all string matches with Regex golang
- Replace with whole match value using Notepad++ regex search and replace
- Regular Expression usage with ls
- Difference between regex quantifiers plus and star
- Finding and removing Non-ASCII characters from an Oracle Varchar2