MySQL Forums
Forum List  »  Perl

Re: CGI - Perl PREG help - please?
Posted by: Rick James
Date: April 05, 2009 04:51PM

$tmp =~ m/(?:Member|Membre|Mitglieder).*?(\d+)/;
Then $1 will give you the first sting of digits after the first occurrence of 'Member' (spelled any of 3 ways).

: is a colon,
; is a semi-colon.

With the code snippet you gave, I see no need for backtracking (?>...).

PHP and Perl regexps are virtually identical. I suspect there are cases where the number of backslashes(\) needed is more in PHP.

Options: ReplyQuote

Written By
Re: CGI - Perl PREG help - please?
April 05, 2009 04:51PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.