Re: Anyone feeling awesome at regex?

From: Steve Jenkins <stevejenkins_at_gmail.com>
Date: Thu, 13 Jun 2013 09:19:16 -0700

On Thu, Jun 13, 2013 at 9:13 AM, Todd Lyons <tlyons_at_ivenue.com> wrote:

>
> \bopendkim[-_]([^-/_\s]+?)(?i)(?:[-_](?:src|source))?(?<!Beta\d)\.(?:tar|t[bglx]z|tbz2|zip)\b
>
> There cannot be a regex in a negative lookbehind assertion, so if the
> amount of Betas would ever grow to double digits, you would have to
> add another grouping to detect it, same if there are RC releases:
>
>
> \bopendkim[-_]([^-/_\s]+?)(?i)(?:[-_](?:src|source))?(?<!Beta\d)(?<!Beta\d\d)\.(?:tar|t[bglx]z|tbz2|zip)\b
>
>
> \bopendkim[-_]([^-/_\s]+?)(?i)(?:[-_](?:src|source))?(?<!Beta\d)(?<!Beta\d\d)(?<!RC\d)\.(?:tar|t[bglx]z|tbz2|zip)\b
>
> etc


Thx, Todd! :)

SteveJ
Received on Thu Jun 13 2013 - 16:19:32 PST

This archive was generated by hypermail 2.3.0 : Thu Jun 13 2013 - 16:27:02 PST