←back to thread

698 points jgrahamc | 3 comments | | HN request time: 0.6s | source
1. electricviolet ◴[] No.20424536[source]
I'm a relatively novice regex user. Could anyone explain to me why someone might use an expression like `.(?:.=.*)` ? What is the meaning of the group if it's boundary could be placed in any number of places? Hope that makes sense.
replies(1): >>20424680 #
2. jetbooster ◴[] No.20424680[source]
It can be useful depending on how the engine handles the match. The non-capturing group is the important part, the .* is just there so that the 'full match' isn't just an empty string, but contains the whole line the rule is being run against
replies(1): >>20426734 #
3. ◴[] No.20426734[source]