Question marks in regular expressions
The key difference between ? and ?? concerns their laziness. ?? is lazy, ? is not. Let’s say you want to search for the word “car” in a body of text, but you don’t want to be restricted to just the singular “car”; you also want to match against the plural “cars”. Here’s an example sentence: I own three cars. Now, if I wanted … Read more