Re: Anyone feeling awesome at regex?

From: Todd Lyons <tlyons_at_ivenue.com>
Date: Thu, 13 Jun 2013 09:13:11 -0700

\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

...Todd

On Wed, Jun 12, 2013 at 4:10 PM, Steve Jenkins <stevejenkins_at_gmail.com> wrote:
> Good news #1 is that I successfully added OpenDKIM to Fedora's automated
> Upstream Release Monitoring, as shown here:
>
> http://fedoraproject.org/wiki/Upstream_release_monitoring
>
> Good news #2 is that it worked for the first time today, creating a RedHat
> Bugzilla entry, assigning it to me, and then notifying me:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=973541
>
> The bad news is that configured as-is (using the "built for Sourgeforce"
> defaults), the monitor will create new Bugzilla entries for me on EVERY beta
> release, which is not what I want. I only want a new bug on a full release
> version, which I can then resolve with the release of an updated pacakge.
>
> The Fedora Upstream Release Monitor works with regex, and it's applying this
> expression:
>
> \b<package
> name>[-_]([^-/_\s]+?)(?i)(?:[-_](?:src|source))?\.(?:tar|t[bglx]z|tbz2|zip)\b
>
> to this URL:
>
> http://sourceforge.net/api/file/index/project-name/opendkim/mtime/desc/limit/20/rss
>
> I suck at regex, so would there happen to be a kind regex stud in our clan
> who might propose a better expression for me that will only pick up the
> non-beta releases?
>
> Thanks!
>
> SteveJ



--
The total budget at all receivers for solving senders' problems is $0.
 If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine
Received on Thu Jun 13 2013 - 16:13:31 PST

This archive was generated by hypermail 2.3.0 : Thu Jun 13 2013 - 16:18:01 PST