[PHP] Reg Exp help needed

2003-06-24 Thread Sparky Kopetzky
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,

Re: [PHP] Reg Exp help needed

2003-06-24 Thread Don Read
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' $goodbadnum=

[PHP] Reg exp help

2002-08-30 Thread Victor Spång Arthursson
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=/v044file=v044_27.jpg

[PHP] Reg Exp Help

2002-01-25 Thread Zach Curtis
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

RE: [PHP] Reg Exp Help

2002-01-25 Thread Zach Curtis
, 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 ?? This one has a 8

RE: [PHP] Reg Exp Help

2002-01-25 Thread Zach Curtis
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 - Bean IT [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 25

RE: [PHP] Reg Exp Help

2002-01-25 Thread Zach Curtis
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 - Bean IT [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January

RE: [PHP] Reg Exp Help

2002-01-25 Thread Zach Curtis
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

[PHP] reg exp help

2001-07-22 Thread Justin French
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 sure

[PHP] Reg. Exp. Help

2001-02-12 Thread Scott Mebberson
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

Re: [PHP] Reg. Exp. Help

2001-02-12 Thread Scott Mebberson
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