logoalt Hacker News

dorianmariecomtoday at 3:29 PM1 replyview on HN

why the "?" ?


Replies

K0INtoday at 5:17 PM

To make it lazy. It's the match anything in-between so you can put stuff before and after its my most used regex.

"my name is (.*?)$" => my name is k0in

Or values "last (.*?), was great" => last sunday, was great