Re: [PHP] ereg

2002-01-10 Thread Jimmy
Hi Kunal, > ereg("(.*)", $lineofhtml, $output); ereg("([^]*)", $lineofhtml, $output); -- Jimmy It's not what you have in your life that counts, but who you have in your life -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTE

Re: [PHP] ereg

2002-01-10 Thread Kunal Jhunjhunwala
Nopes, dint work Regards, Kunal Jhunjhunwala - Original Message - From: "Jimmy" <[EMAIL PROTECTED]> To: "Kunal Jhunjhunwala" <[EMAIL PROTECTED]> Cc: "php-list" <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 9:30 AM Subject: Re: [PHP] e

RE: [PHP] ereg

2002-01-10 Thread Martin Towell
what about ? ereg("(.*?)", $lineofhtml, $output); -Original Message- From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 3:05 PM To: Jimmy Cc: php-list Subject: Re: [PHP] ereg Nopes, dint work Regards, Kunal Jhunjhunwala - Original Message

Re: [PHP] ereg

2002-01-10 Thread Kunal Jhunjhunwala
RE: [PHP] eregWarning: REG_ERANGE on line 83 83: ereg("(.*?)", $lineofhtml, $output); Regards, Kunal Jhunjhunwala - Original Message - From: Martin Towell To: 'Kunal Jhunjhunwala' ; Jimmy Cc: php-list Sent: Friday, January 11, 2002 9:36 AM Sub

RE: [PHP] ereg

2002-01-10 Thread Niklas Lampén
You should use preg_match_all() for this. Something like this should do (didn't try it thou): preg_match_all("|(.*)\">|U", $lineofhtml, $output, PREG_PATTERN_ORDER); Niklas -Original Message- From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] Sent: 11. tammikuuta 2002 5:56 To: php-l

RE: [PHP] ereg

2002-01-10 Thread Rasmus Lerdorf
al Jhunjhunwala [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 11, 2002 3:05 PM > To: Jimmy > Cc: php-list > Subject: Re: [PHP] ereg > > > Nopes, dint work > Regards, > Kunal Jhunjhunwala > - Original Message - > From: "Jimmy" <[EMAIL PROTECT

Re: [PHP] Ereg ()

2002-04-16 Thread Erik Price
On Tuesday, April 16, 2002, at 08:49 AM, [EMAIL PROTECTED] wrote: > > I'm new with RegEx and I would like to use them to validate my forms > entries submitted to the server. > > My question is how can I verify with the regex that a string is > - at least 7 chars > - contains Chars and Nums > -

Re: [PHP] Ereg ()

2002-04-16 Thread DrouetL
cc: [EMAIL PROTECTED] Subject: Re: [PHP] Ereg () 16/04/02 15:44

Re: [PHP] Ereg ()

2002-04-16 Thread Erik Price
On Tuesday, April 16, 2002, at 09:51 AM, [EMAIL PROTECTED] wrote: > > Thanks for this answer. > > But how can i test if i actually have numbers AND letters ? preg_match('/([A-Za-z].*[\d]|[\d].*[A-Za-z]/', $string); Untested, but in theory should work. > On Tuesday, April 16, 2002, at 08:49

Re: [PHP] ereg

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 12:51, Jason Soza wrote: > Hoping someone can help me here. I'm working with someone else's code and > I'm not familiar with ereg_replace(), can someone provide me an alternative > to the following? > > ereg_replace("[^a-z0-9._]", "", > ereg_replace (" ", "_", > ereg_replace(

RE: [PHP] ereg()

2001-01-29 Thread Maxim Maletsky
only letters and space ? if (eregi("^[A-Z ]+$", $firstname)) this will return true only if a case-insensitive string will contain only letters and spaces... (and the string must not be NULL) if (eregi("^([A-Z]+( )*[A-Z]+)$", trim($firstname)))\ this will return "Maxim Maletsky", " Maxim Male

Re: [PHP] ereg

2001-03-31 Thread Chris Adams
On 31 Mar 2001 21:07:59 -0800, Michael Hall <[EMAIL PROTECTED]> wrote: > >I'm using the following expression to check input strings: > >if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! } > >This works fine except for when a string has spaces, as in text. What do I >need to add to the expr

Re: [PHP] ereg

2001-04-01 Thread Steve Edberg
At 9:47 PM -0800 3/31/01, Chris Adams <[EMAIL PROTECTED]> wrote: >On 31 Mar 2001 21:07:59 -0800, Michael Hall <[EMAIL PROTECTED]> wrote: >> >>I'm using the following expression to check input strings: >> >>if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! } >> >>This works fine except for

Re: [PHP] ereg()

2001-08-28 Thread Jack Dempsey
You could try fgets from the fp instead of fread. Then for each line depending on how well structured it is you have a variety of options, but i think this would be at least a good start: www.php.net/preg_split - split on multiple spaces - \s+ jack Ben Quinn wrote: > Hi all > > Say i had text s

Re: [PHP] ereg

2001-09-30 Thread ReDucTor
use MSIE:[56|5\..|6\..] something like that, i suck at regular expression :D - Original Message - From: "Matthew Delmarter" <[EMAIL PROTECTED]> To: "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Monday, October 01, 2001 1:32 PM Subject: [PHP] ereg > How do I use ereg to check for MSIE 5.5

Re: [PHP] ereg help

2001-12-03 Thread Jim
This is a good starter about PHP and regular expressions. http://www.phpbuilder.com/columns/dario19990616.php3 >- Original Message - >From: "Valentin V. Petruchek" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Monday, December 03, 2001 6:35 PM >Subject: [PHP] ereg help > > >> I'm

Re: [PHP] ereg help

2001-12-03 Thread J Smith
Something like this will work: eregi("^id \{([a-z]*),([a-z]+),([a-z]+)\} \[(.+)\]$", $str, $regs); $regs will be an array containing: [0] => "id {name,title,nick} [http://www.php.net]"; [1] => "name" [2] => "title" [3] => "nick" [4] => "http://www.php.net"; If course this isn't very foolproof

Re: [PHP] ereg problem

2001-02-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Janet Valade) wrote: > if (!ereg("^[0-9\-\+\.\ \)\(]{10,}$",$value)) { > > Can anyone tell me why this works for every character except the -. It > doesn't see the hyphen as a valid part of the phone number, even though it > recognizes the oth

Re: [PHP] ereg problem

2001-02-14 Thread Charlie Llewellin
the - needs to be immediately after the [ to include that character. Otherwise it is a range indicator. Charlie - Original Message - From: "CC Zona" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 14, 2001 12:56 PM Subject: Re: [PHP] ereg

Re: [PHP] ereg problem

2001-02-14 Thread CC Zona
> > Sent: Wednesday, February 14, 2001 12:56 PM > Subject: Re: [PHP] ereg problem > > > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (Janet Valade) wrote: > > > > > if (!ereg("^[0-9\-\+\.\ \)\(]{10,}$",$value)) { > > >

RE: [PHP] ereg problem

2001-02-14 Thread Janet Valade
Thank you. That was exactly the problem. Janet > -Original Message- > From: Charlie Llewellin [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, February 14, 2001 11:00 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] ereg problem > > the - ne

RE: [PHP] ereg problem

2001-02-15 Thread Maxim Maletsky
- hyphen is something a bit special in RegEx .. read the manual, I think you should escape it. Cheers, Maxim Maletsky -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 15, 2001 3:21 AM To: '[EMAIL PROTECTED]' Subject: [PHP] ereg problem I am

Re: [PHP] ereg problem

2001-02-16 Thread Jeff Warrington
In article <[EMAIL PROTECTED]>, "Janet Valade" <[EMAIL PROTECTED]> wrote: if you include a hyphen in a character class, it must be the last entry in the range, otherwise it is interepreted as the range separator. [0-9+.\()-] is what you want (probably have to escape some of the chars above).

RE: [PHP] ereg issues

2001-05-10 Thread ..s.c.o.t.t.. [gts]
print preg_replace('/(.*?)(\w{2})(.*)/', '\\2', $blah); works for: $blah = "*9 scott 777zxsdf"; and $blah = "scott"; > -Original Message- > From: Jerry Lake [mailto:[EMAIL PROTECTED]] > Subject: [PHP] ereg issues > > I'm feeling a bit stupid today > how do I truncate a string to the >

Re: [PHP] ereg issues

2001-05-10 Thread Jack Dempsey
isn't a \w a word character, meaning a-zA-Z_0-9 (in perl)? if so, that wouldn't match the a-zA-z he originally intended... am i missing something? -jack "..s.c.o.t.t.. [gts]" wrote: > > print preg_replace('/(.*?)(\w{2})(.*)/', '\\2', $blah); > > works for: > > $blah = "*9 scott 777zxsdf"; > a

RE: [PHP] ereg issues

2001-05-10 Thread scott [gts]
oh yeah. sorry... > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jack > Dempsey > Sent: Thursday, May 10, 2001 3:15 PM > To: ..s.c.o.t.t.. [gts] > Cc: Php-General > Subject: Re: [PHP] ereg issues > > > isn't

Re: [PHP] ereg issues

2001-05-10 Thread Jack Dempsey
; Dempsey > > Sent: Thursday, May 10, 2001 3:15 PM > > To: ..s.c.o.t.t.. [gts] > > Cc: Php-General > > Subject: Re: [PHP] ereg issues > > > > > > isn't a \w a word character, meaning a-zA-Z_0-9 (in perl)? > > if so, that wouldn't match

RE: [PHP] ereg issues

2001-05-10 Thread Jerry Lake
: scott [gts] Cc: Php-General Subject: Re: [PHP] ereg issues print preg_replace('/^(.*?)([a-zA-Z]{2})(.*)/','\\2',$blah); try that -jack "scott [gts]" wrote: > > oh yeah. sorry... > > > -Original Message- > > From: [EMAIL PROTECTED] [mai

Re: [PHP] ereg questions

2001-05-23 Thread Ker Ruben Ramos
lt;[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 1:19 AM Subject: Re: [PHP] ereg questions > On Thu, 24 May 2001 01:01:16 +0800, Ker Ruben Ramos > ([EMAIL PROTECTED]) wrote: > >How do i change all '' to ' >href="file.php?file=anything

Re: [PHP] ereg questions

2001-05-24 Thread Dan Lowe
" ? i mean.. something like it got > lots of subdirectories or not. > > Thanks > - Original Message - > From: "Mark Maggelet" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, May 24, 2001 1:19 AM > Subject: Re: [PHP] ere

Re: [PHP] ereg questions

2001-05-24 Thread Ker Ruben Ramos
<[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 5:18 PM Subject: Re: [PHP] ereg questions > Previously, Ker Ruben Ramos said: > > hmm, got a little question. > > 1. what's that \\1 and \\2? got any info on where u got that from? > > Expands t

Re: [PHP] ereg function

2001-05-24 Thread CC Zona
In article <002e01c0e46c$ec2459a0$6e00a8c0@webdesign>, [EMAIL PROTECTED] ("Jay Paulson") wrote: > echo ereg("^[a-zA-Z]$", $fname); > > as you can see I'm just looking to make sure the variable $fname just has > characters a-zA-Z and nothing else. Actually, you're checking whethere the variabl

Re: [PHP] ereg question

2001-09-02 Thread Papp Gyozo
Hello, check it in the manual: http://www.php.net/manual/en/function.ereg.php If you don't pass the third -- optional -- argument, then it's true. Otherwise not. I don't know this book, but you may keep in my mind that PHP is evolving, so the online manual can be its most up-to-date documentati

RE: [PHP] ereg et all

2002-01-31 Thread Rick Emery
try: eregi_replace("this","that","This equals this equals tHis"); -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:40 PM To: [EMAIL PROTECTED] Subject: [PHP] ereg et all hi, is there a simple way to replace an occu

Re: [PHP] ereg et all

2002-01-31 Thread Edward van Bilderbeek - Bean IT
that is not what I meant... I want the cases to remain... - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002

Re: [PHP] ereg et all

2002-01-31 Thread Jeff Sheltren
riginal Message - >From: "Rick Emery" <[EMAIL PROTECTED]> >To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; ><[EMAIL PROTECTED]> >Sent: Thursday, January 31, 2002 10:47 PM >Subject: RE: [PHP] ereg et all > > &

Re: [PHP] ereg et all

2002-01-31 Thread Edward van Bilderbeek - Bean IT
ECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:56 PM Subject: Re: [PHP] ereg et all > I'm not sure why you wanted the last word "tHis" to be changed to "That" > (with a capital)... can you explain further? > > Jeff > > At 10:52 PM

Re: [PHP] ereg et all

2002-01-31 Thread Jeff Sheltren
ltren" <[EMAIL PROTECTED]> >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; ><[EMAIL PROTECTED]> >Sent: Thursday, January 31, 2002 10:56 PM >Subject: Re: [PHP] ereg et all > > > > I'm not sure why you wanted the last word "tHi

Re: [PHP] ereg et all

2002-01-31 Thread Edward van Bilderbeek - Bean IT
t; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] ereg et all > Ahhh, ok makes more sense now. Although, I don't think that there is an > "easy" way to do what you are asking. I think that in order to accomplish >

Re: [PHP] ereg-digits only...

2002-02-12 Thread val petruchek
if ((int($string)==($string)) && ($string>0)) {then positive integer} not sure exactly, but try Valentin Petruchek (aki Zliy Pes) *** Cut the beginning *** http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: "B. Verbeek" <[EMAIL PROTECTED]> To: "Php-Db-Help (E-mail)

Re: [PHP] ereg-digits only...

2002-02-12 Thread
> if ((int($string)==($string)) && ($string>0)) {then positive integer} > > not sure exactly, but try Why not use the RE's? I usually use preg_* so I'll give the example using these... if (preg_match ("/^\d+$/", $string)) { print ("Yep... Only digits."); } else { prnt ("Noop! There are no

RE: [PHP] ereg-digits only...

2002-02-12 Thread Daniel Kushner
ruary 12, 2002 6:22 AM > To: [EMAIL PROTECTED] > Cc: PHP > Subject: Re: [PHP] ereg-digits only... > > > if ((int($string)==($string)) && ($string>0)) {then positive integer} > > not sure exactly, but try > > Valentin Petruchek (aki Zliy Pes) &

Re: [PHP] ereg-digits only...

2002-02-12 Thread val petruchek
ECTED] - Original Message - From: "Daniel Kushner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "PHP" <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 4:00 PM Subject: RE: [PHP] ereg-digits only... > That would

Re: [PHP] ereg-digits only...

2002-02-12 Thread Lars Torben Wilson
On Tue, 2002-02-12 at 03:04, B. Verbeek wrote: > > How do I check a string for it to only contain numbers? > > >> > > if(!ereg("([0-9]+)",$string)){ > > print "It contains characters other than numbers"; > > }else{ > > print "Only numbers"; > > } > > << > > Can anyone give

Re: [PHP] ereg match problem

2001-02-20 Thread richard merit
There's a code section at zend.com. I noticed someone wrote an email check routine that checks for all domains and the correct format. You might try there. rm --- "W.D." <[EMAIL PROTECTED]> wrote: > I'm testing email address, but want to test not only > characters but the @ > sign and for .co

Re: [PHP] ereg match problem

2001-02-20 Thread ..s.c.o.t.t.. [gts]
g|tv)/", $email); - Original Message - From: "richard merit" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 20, 2001 3:06 PM Subject: Re: [PHP] ereg match problem > There's a code section at zend.com. I noticed someone > wrote an email check r

Re: [PHP] ereg() help, plz

2001-07-15 Thread Thomas R. Powell
Try this, while ($file_name = readdir($dir2)) { if ($file_name!="." && $file_name!=".." && $file_name!="head.jpg" && !ereg(^tn_,$file_name)) { $files[]=$file_name; } } $numfiles = count($files); for ($i=$g; $i<$numfiles; $i++){ echo $files[$i]; } Tom At 09:45 PM 7/14/01 -0400, you wrote: >

Re: [PHP] ereg parse error problem

2001-07-12 Thread Philip Murray
Hi Lara, The problem isn't with the if(ereg) line, its the line above. Put a semi-colon at the end of your $string = "..[snip].." line Cheers - -- - - - Philip Murray - Senior Systems Engineer [EMAIL PROTECTED] - Open2View.com http://www.open2view.com -

Re: [PHP] ereg et all - new question..

2002-01-31 Thread Edward van Bilderbeek - Bean IT
ake it easier? not for me :-) Greets, Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] er

Re: [PHP] ereg et all - new question..

2002-01-31 Thread Richard Crawford
ase, > the 's should be put around it... > > does that make it easier? not for me :-) > > Greets, > > Edward > > > - Original Message - > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > To: "Edward van Bilderbeek - Bean IT" <

Re: [PHP] ereg et all - new question..

2002-01-31 Thread Richard Crawford
; > > does that make it easier? not for me :-) > > > > Greets, > > > > Edward > > > > > > - Original Message ----- > > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > To: "Edward van Bilderbeek - Bean IT" <[EM

Re: [PHP] ereg et all - new question..

2002-01-31 Thread Edward van Bilderbeek - Bean IT
IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:20 PM Subject: Re: [PHP] ereg et all - new question.. > Seems like that makes it a LOT easier. > > Use eregi_relace() instead of ereg_replace(). eregi allows for > case-insensitivity. > &

Re: [PHP] ereg et all - new question..

2002-01-31 Thread Richard Crawford
otta look for it again > :-) > > Thanks, > > Edward > > - Original Message - > From: "Richard Crawford" <[EMAIL PROTECTED]> > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday,

RE: [PHP] ereg checking if its only numbers

2001-10-04 Thread Jack Dempsey
if(!preg_match("/^\d+$/",$string){ echo "$string has something other than a number"; } -Original Message- From: Chris Aitken [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 9:34 PM To: PHP General Mailing List Subject: [PHP] ereg checking if its only numbers Ive bee

RE: [PHP] ereg checking if its only numbers

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)
To: Chris Aitken; PHP General Mailing List > Subject: RE: [PHP] ereg checking if its only numbers > > > if(!preg_match("/^\d+$/",$string){ > echo "$string has something other than a number"; > } > > -Original Message- > From: Chris Aitken

Re: [PHP] ereg checking if its only numbers

2001-10-04 Thread Evan
try: There is a great book on regular expressions by o'reily. Evan *** REPLY SEPARATOR *** On 10/5/01 at 11:33 AM Chris Aitken wrote: >Ive been playing around with ereg for about half an hour and having no >joy >because I dont really understand the medhod behind it and how

Re: [PHP] ereg checking if its only numbers

2001-10-04 Thread Rasmus Lerdorf
http://php.net/is_numeric On Fri, 5 Oct 2001, Chris Aitken wrote: > > Ive been playing around with ereg for about half an hour and having no joy > because I dont really understand the medhod behind it and how it all works. > But what im trying to do is check to see if a 9 digit string is all num

Re: [PHP] ereg checking if its only numbers

2001-10-04 Thread _lallous
That's not regexps Rasmus! :) I always see you referring us the the manual! sometimes you refer to a function i never say in my life! ;) "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > http://php.net/is_numeric > > On Fri, 5 Oct 2001, Chris Ait

Re: [PHP] ereg works in .php, not in .inc

2001-01-13 Thread Richard Lynch
Do you have in your .inc file?... - Original Message - From: Ted Goranson <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Saturday, January 13, 2001 12:35 AM Subject: [PHP] ereg works in .php, not in .inc > Friends-- > > I have a script that processes another script for display. I ch

RE: [PHP] ereg() not matching same text each time script is run...

2002-04-23 Thread John Holmes
Someone gave me the preg_match equivalent preg_match( '/([-_a-z]+)\.([a-z]+)$/i', $row['site'], $match2 ); I tried that and it took care of the problem, as far as I can tell. To me, that narrows it down to a problem (bug?) with ereg... anyone else have any ideas? ---John Holmes... > -Ori