Re: [Nolug] test

From: Petri Laihonen <pietu_at_weblizards.net>
Date: Wed, 10 Jun 2009 19:06:53 -0500
Message-ID: <4A304A9D.6020301@weblizards.net>

Tried to send again, but for some reason this post does not appear in
the nolug list.
Therefore, since my reply to "test" appeared, perhaps this one does too.

Orig Subject: Regex help needed

Do we have any regex geniuses on the wire?

I've heard regular expressions are powerful thing....... I agree
....they are very powerful driving you nuts trying to figure them out.....

I'm trying to match 2 strings together.... (Will use in a PHP environment)
String 1: "ABC%A706" (Where % is a wildcard, thus should match to any character)
String 2: "model-abc-a706/ software version 0.3 /sumptin else"
String 3: "model-abc-h706/ software version 0.3 /sumptin else"

With the above strings, 1 and 2 would be match, but 1 and 3 are not.

In other words, anything before, on the % sign, and after the string 1
is OK. As long as portions "abc" and "a706" are found from the longer
string with only one character, ....any character in between them.

Any hints?

Petri

Joey Kelly wrote:
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
___________________
Nolug mailing list
nolug@nolug.org
Received on 06/10/09

This archive was generated by hypermail 2.2.0 : 08/06/09 EDT