Hacker News new | ask | show | jobs
by dorianmariecom 31 days ago
why the "?" ?
1 comments

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