[PHP] Regular expression question

2001-11-09 Thread Leon Mergen
Hello, I have a little question regarding regular expressions... I want to check for the pattern $num:: But, $num may not be started with another number (assume the number will be 51 , 1 will also match (the pattern 1:: is available in 51::) ... Currently, my regular expression is: eregi("([^0

[PHP] Regular Expression Question

2001-05-22 Thread Dylan Finney
Hello, I was wondering if there is a way to match a pattern, then delete the entire line containing the pattern. I.E. (if I was searching for "pattern" in a file containing pattern:info:info:info pattern2:info:info:info pattern3:info:info:info is there a way to delete the entire, and only the

[PHP] Regular Expression Question

2001-07-25 Thread Jeff Oien
I want to replace a string like this 1B335-2G with this B335. So for all the strings I want to remove the first character and the last three characters. I'm not sure which replace function to use or how to go about it. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Regular expression question

2001-11-09 Thread Jack Dempsey
num is 151? see what i mean? - Original Message - From: "Leon Mergen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 09, 2001 1:53 PM Subject: [PHP] Regular expression question > Hello, > > I have a little question regarding regular

RE: [PHP] Regular Expression Question

2001-07-25 Thread Seb Frost
Subject: [PHP] Regular Expression Question I want to replace a string like this 1B335-2G with this B335. So for all the strings I want to remove the first character and the last three characters. I'm not sure which replace function to use or how to go about it. Thanks. Jeff Oien -- PHP Ge

RE: [PHP] Regular Expression Question

2001-07-25 Thread Jeff Oien
string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question

RE: [PHP] Regular Expression Question

2001-07-25 Thread Seb Frost
I hope my later message clarifys what I mean. - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:05 To: PHP Subject: RE: [PHP] Regular Expression Question Aren't the trims just for white space? Jeff Oien > since you know exactly

RE: [PHP] Regular Expression Question

2001-07-25 Thread Matthew Loff
eturns "bcd" -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:09 PM To: [EMAIL PROTECTED]; PHP Subject: RE: [PHP] Regular Expression Question I hope my later message clarifys what I mean. - seb -Original Message- From: Jeff O

RE: [PHP] Regular Expression Question correction

2001-07-25 Thread Seb Frost
$newstring = substr($string,1,4); FOUR, not FIVE. Doh. -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:03 To: [EMAIL PROTECTED]; PHP Subject: RE: [PHP] Regular Expression Question since you know exactly which 4 characters you want to keep you can