On 24-Jun-2003 Sparky Kopetzky wrote:
> I'm translating (hacking) code from Perl to PHP and have two reg exp
> expressions I can't figure out what they do.
>
> 1st: $goodbadnum =~ tr/0-9//cd; I think this one removes any chars that
> are not numbers.
>
Nope. That removes digits '0-9'
$goodbadnu
or less overhead than a single regular expression?
Thank you.
Zach
-Original Message-
From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 11:36 AM
To: Zach Curtis
Subject: Re: [PHP] Reg Exp Help
You said:
> The password and int_id begin
day, January 25, 2002 10:29 AM
To: Zach Curtis
Subject: Re: [PHP] Reg Exp Help
but if the positions as fixed, why don't you use the substr, and then trim
th result?
Edward
- Original Message -
From: "Zach Curtis" <[EMAIL PROTECTED]>
To: "Edward van Bilderbeek
nt: Friday, January 25, 2002 10:29 AM
To: Zach Curtis
Subject: Re: [PHP] Reg Exp Help
but if the positions as fixed, why don't you use the substr, and then trim
th result?
Edward
- Original Message -
From: "Zach Curtis" <[EMAIL PROTECTED]>
To: "Edward van Bild
, it's variable.
Zach
-Original Message-
From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 9:58 AM
To: Zach Curtis
Subject: Re: [PHP] Reg Exp Help
how can I see that it isn't a 6 char $password with a 3 char $int_id ??
> Thi
On Tuesday 13 February 2001 04:59, Scott Mebberson wrote:
> I think that maybe preg_match() or preg_match_all() is the answer but I
> have know idea on how to make the regular expression I am using perl
> comptaible.
>
> Here it is:
> $txt = ereg_replace("src=\"([^>]+)\.(gif|jpg)\"",
> "src=\"http
I really need help with this.
I have written a regular expression that searches for any occurance of
src="*" in a html page and rewrites it so that it is equal to
src="http://www.whereever.com/images/filename.jpg" -
If there are five occurances of this match then it replaces them all. Is
th
7 matches
Mail list logo