0

I'm trying to get...

\[(RFC )?(PATCH )(RFC )?([vV]\d+ )?(0+\/\d+)\]

Which matches the likes of:

[PATCH v1 000/100] Test
[PATCH 0/2] Test
[PATCH 00/11] Test
[RFC PATCH 0/7] Test
[PATCH V1 000/100] Test
[PATCH RFC 0/7] Test

...working as a Gmail rule. I'm guessing it's not working because of the differences between PCRE & RE2 that Gmail uses.

Does anyone have any tricks that'll allow me to filter the Cover Letters into it's own Label?

The first bit works but it seems to not like the [vV] or even the (0+/\d+) on its own

  • Try replacing all `+` with `{1,25}`,in filters, `+` is not allowed. – Wiktor Stribiżew Jun 20 '15 at 20:05
  • I Think that's edging closer but it's still not working - I also tried replacing \d with [[:digit:]] with no success – Mike Lothian Jun 20 '15 at 21:10
  • It is possible that the "worst" part of the regex is `([vV]\d+ )?` that has nested quantifiers `+` and `?`. You might need to split the pattern into 2 alternatives, something like: `\[(RFC )?(PATCH )(RFC )?(0{1,25}/[0-9]{1,25})\]|\[(RFC )?(PATCH )(RFC )?([vV][0-9]{1,25} )(0{1,25}\/[0-9]{1,25})\]`. Maybe even `[vV]` is unnecessary (`v` should suffice), since in Content Manager, the case sensitivity is OFF by default. – Wiktor Stribiżew Jun 20 '15 at 21:29
  • Thanks but that doesn't work either - just doing a search with ([vV][0-9]{1,25} ) doesn't bring up any results - switching out [vV] with v brings up some results but I don't think it's the results I'd expect – Mike Lothian Jun 21 '15 at 01:11
  • Does anyone else have any insights they can offer? – Mike Lothian Jul 01 '15 at 08:07

0 Answers0