←back to thread

698 points jgrahamc | 2 comments | | HN request time: 0.436s | source
Show context
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 #
1. 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 #
2. ◴[] No.20426734[source]