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
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.
2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with an 'x'.
Right, wr
Hi!
I need some help with a reg exp
I'm building a little viewer for my
http access logs, and what i'ld like to do is to clean it from alla
hits from my own ip
Take for example:
194.236.30.24 - - [30/Aug/2002:11:46:29 +0200] "GET
/bildgalleri/createjpg.php?url=/v044&file=v044_27.jpg HTT
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
I am trying to code a regular expression that will match at the beginning of
the string the contents of $password, followed by 0 or more occurrences of
white space, followed by the contents of $int_id. The match should be case
insensitive.
Here are some examples of the strings:
This one has a 6
hi all,
two quick reg exp problems:
one:
$username must only contain a-z lowercase, 0-9, no spaces, no other characters.
what would the regexp be?
if(ereg("", $username)) { $valid = "yes" } else { $valid
= "no")
two:
i want to do a really small email validation, just to make s
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
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
there anyway to make it only run once.
12 matches
Mail list logo