The non-greedy regex modifiers are like their greedy counter-parts but with a ?
immediately following them:
* - zero or more
*? - zero or more (non-greedy)
+ - one or more
+? - one or more (non-greedy)
? - zero or one
?? - zero or one (non-greedy)
More Related Contents:
- How to split a long regular expression into multiple lines in JavaScript?
- Regex to remove spaces between ‘[‘ and ‘]’
- Javascript: Decimals still being allowed in regex check for numbers [duplicate]
- Find String and extract with next String
- Regular Expression jquery validation1 [duplicate]
- How to count string occurrence in string?
- Check for special characters in string
- Regex to check whether a string contains only numbers [duplicate]
- Regular expression which matches a pattern, or is an empty string
- How to replace captured groups only?
- Remove insignificant trailing zeros from a number?
- What is the best way to parse html in google apps script
- Regular expression for IP Address Validation
- Why does Javascript’s regex.exec() not always return the same value? [duplicate]
- JavaScript .replace only replaces first Match [duplicate]
- Unroll Loop, when to use
- Why does a simple .*? non-greedy regex greedily include additional characters before a match?
- JavaScript regex: Positive lookbehind alternative (for Safari and other browsers that do not support lookbehinds)
- Regex negative lookbehind not valid in JavaScript [duplicate]
- Regular Expression to reformat a US phone number in Javascript
- Validate phone number using javascript
- regex to get the number from the end of a string
- Converting Date and Time To Unix Timestamp
- JavaScript – string regex backreferences
- Get index of each capture in a JavaScript regex
- Regular Expression for accurate word-count using JavaScript
- JavaScript replace \n with [duplicate]
- What’s different between Python and Javascript regular expressions?
- Extract keyword from Google search in Javascript
- Regex: only alphanumeric but not if this is pure numeric