Re: [PHP] ereg help!

2008-01-09 Thread Richard Heyes
$out = basename($file, ".html") . ".com"; fairly limited i think, but simple. Nothing wrong with being simple, and therefore both fast and easy to understand by a wider audience. The only downer I can immediately think of though is that whitespace isn't accommodated, but who really ends a fi

Re: [PHP] ereg help!

2008-01-09 Thread Anup Shukla
steve wrote: On Tuesday 08 January 2008 20:30:29 Chris wrote: I usually use preg_* functions so here's my go: echo preg_replace('/\.php$/', '.com', $file); The '$' at the end makes sure it's a .php file and won't cause problems with files like xyz.php.txt . (otherwise I'd just use a str

Re: [PHP] ereg help!

2008-01-08 Thread steve
On Tuesday 08 January 2008 20:30:29 Chris wrote: >I usually use preg_* functions so here's my go: >echo preg_replace('/\.php$/', '.com', $file); >The '$' at the end makes sure it's a .php file and won't cause problems >with files like xyz.php.txt . >(otherwise I'd just use a straight str_replac

Re: [PHP] ereg help!

2008-01-08 Thread Chris
steve wrote: I have a dir of html files that link to websites, i would like to read the dir and print a list of those files as a link. Which the script i have does. I would like to take this one step further and replace the ".html" extension with ".com" so it winds up being: website.com instea

Re: [PHP] ereg help!

2008-01-08 Thread Casey
On Jan 8, 2008, at 5:45 PM, steve <[EMAIL PROTECTED]> wrote: I have a dir of html files that link to websites, i would like to read the dir and print a list of those files as a link. Which the script i have does. I would like to take this one step further and replace the ".html" extension

[PHP] ereg help!

2008-01-08 Thread steve
I have a dir of html files that link to websites, i would like to read the dir and print a list of those files as a link. Which the script i have does. I would like to take this one step further and replace the ".html" extension with ".com" so it winds up being: website.com instead of website.ht

Re: [PHP] ereg() problem

2007-01-31 Thread jekillen
On Jan 31, 2007, at 4:38 PM, Richard Lynch wrote: On Tue, January 30, 2007 8:36 pm, jekillen wrote: I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); testing $route I get: $route = $m[1]; print $route.''; jk/in' rec='a_378e6dc4.xml' /> (out put o

Re: [PHP] ereg() problem: solution

2007-01-31 Thread jekillen
Hi In reference to my query about 'greed' in regex in php and the following code $x = ereg("", $get_route, $m); I solved the immediate problem with the following: as you can see, the regex is quite a bit more complicated and I do not know if it will match all the possibilities that it will have

Re: [PHP] ereg() problem

2007-01-31 Thread Jim Lucas
jekillen wrote: On Jan 31, 2007, at 8:13 AM, Jim Lucas wrote: jekillen wrote: Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); do we need to break out of the text to include the $to variable?? The $to variable is what I use t

Re: [PHP] ereg() problem

2007-01-31 Thread Jim Lucas
jekillen wrote: On Jan 31, 2007, at 8:13 AM, Jim Lucas wrote: jekillen wrote: Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); do we need to break out of the text to include the $to variable?? The $to variable is what I use t

Re: [PHP] ereg() problem

2007-01-31 Thread Richard Lynch
On Tue, January 30, 2007 8:36 pm, jekillen wrote: > I am having trouble with ereg(). > The following is the problem code > $x = ereg("", $get_route, > $m); > testing $route I get: > $route = $m[1]; > print $route.''; > jk/in' rec='a_378e6dc4.xml' /> (out put of print) > jk is all I am looking for b

Re: [PHP] ereg() problem

2007-01-31 Thread jekillen
On Jan 31, 2007, at 8:13 AM, Jim Lucas wrote: jekillen wrote: Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); do we need to break out of the text to include the $to variable?? The $to variable is what I use to id the tag to g

Re: [PHP] ereg() problem

2007-01-31 Thread Jim Lucas
jekillen wrote: Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); do we need to break out of the text to include the $to variable?? testing $route I get: do you mean $get_route? $route = $m[1]; print $route.''; jk/in' rec='a_3

[PHP] ereg() problem

2007-01-30 Thread jekillen
Hello php list; I am having trouble with ereg(). The following is the problem code $x = ereg("", $get_route, $m); testing $route I get: $route = $m[1]; print $route.''; jk/in' rec='a_378e6dc4.xml' /> (out put of print) jk is all I am looking for but is it greed that is missing the forward slash

RE: [PHP] Ereg problem

2006-06-27 Thread Beauford
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: June 27, 2006 12:58 PM To: Beauford Cc: PHP-General Subject: Re: [PHP] Ereg problem On Tue, 2006-06-27 at 12:14, Beauford wrote: > One more in my recent woes. The last elseif does not work in the code >

Re: [PHP] Ereg problem

2006-06-27 Thread John Nichel
Beauford wrote: Please turn of your mail client's request for return receipts when sending to a mailing list. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Ereg problem

2006-06-27 Thread Robert Cummings
On Tue, 2006-06-27 at 12:14, Beauford wrote: > One more in my recent woes. The last elseif does not work in the code below > - even if the string is correct it always says it's incorrect. Even if I > remove everything else and just have the ereg satement is doesn't work > either. > > The code belo

[PHP] Ereg problem

2006-06-27 Thread Beauford
One more in my recent woes. The last elseif does not work in the code below - even if the string is correct it always says it's incorrect. Even if I remove everything else and just have the ereg satement is doesn't work either. The code below is in a function and $_POST['password1'] is passed to t

Re: [PHP] ereg function

2004-12-31 Thread Rory Browne
The ereg function doesn't have the capability to test the age of the person viewing your page. You have to depend on them to input their age in some way. Your answer depends on how your age is submitted. Assuming it is submited as $_POST['age'], you could perhaps use ereg("0*[7-9]$", $_POST['age']

Re: [PHP] ereg function

2004-12-31 Thread Rasmus Lerdorf
Numbers are pretty easy. You could just do: $age = (int)$_POST['age']; if($age > 9) do_something(); else do_something_else(); Using ereg doesn't make much sense in this case. -Rasmus On Fri, 31 Dec 2004, Michael Lutaaya wrote: > I want to validate someones age. How do I do this in >

[PHP] ereg function

2004-12-31 Thread Michael Lutaaya
I want to validate someones age. How do I do this in the ereg function. I also have some visitors on my site who are in between the ages of 7-9 so don't forget to make them part of the ereg function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

[PHP] ereg question/prob...

2004-07-15 Thread bruce
hi... i have the following... $file = ".txt"; ereg("(\.)([a-z0-9]{3,5})$", $file, $regs); echo " ww = ".$regs. ""; i'm trying to figure out how to get the portion of the regex that's the "extension" of the file. my understanding of the docs, says that the "extension" should be in the $reg

Re: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread Curt Zirzow
* Thus wrote Tom Rogers ([EMAIL PROTECTED]): > Hi, > > Thursday, April 15, 2004, 8:56:05 AM, you wrote: > RB> At 15:02 14-04-2004, Tom Rogers wrote: >>... >> > RB> preg_replace() and ereg_replace(), so it's a bit hard to get a quick > RB> glimpse of how big the difference really is ... (or for the

Re[2]: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 8:56:05 AM, you wrote: RB> At 15:02 14-04-2004, Tom Rogers wrote: >>Hi, >> >>Thursday, April 15, 2004, 12:51:20 AM, you wrote: >>RB> Never mind y'all ... me stupid ... >> >>RB> obviously the ( has meaning, and needs to be escaped ... was starting to >>RB> think it cou

Re: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread -{ Rene Brehmer }-
At 15:02 14-04-2004, Tom Rogers wrote: Hi, Thursday, April 15, 2004, 12:51:20 AM, you wrote: RB> Never mind y'all ... me stupid ... RB> obviously the ( has meaning, and needs to be escaped ... was starting to RB> think it could only do 2 ereg's in 1 script *sigh* RB> Sorry for wasting time and ban

Re: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 12:51:20 AM, you wrote: RB> Never mind y'all ... me stupid ... RB> obviously the ( has meaning, and needs to be escaped ... was starting to RB> think it could only do 2 ereg's in 1 script *sigh* RB> Sorry for wasting time and bandwidth ... the function now looks lik

[PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread -{ Rene Brehmer }-
Never mind y'all ... me stupid ... obviously the ( has meaning, and needs to be escaped ... was starting to think it could only do 2 ereg's in 1 script *sigh* Sorry for wasting time and bandwidth ... the function now looks like this and works : function gfx_smiley($text) { $smiley_path = 'sm

RE: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???

2004-04-14 Thread Jay Blanchard
[snip] :'( :'-( this causes the entire message to disappear: $text = ereg_replace(':'-?(','',$text); [/snip] Have you tried any of the other regular expression functions available? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ereg-replace ... how to catch :'( [crying smiley] ???

2004-04-14 Thread -{ Rene Brehmer }-
I'm trying to do graphical smileys for my guestbook, but I've run into a problem with the crying smilies: I need to replace :'( and :'-( ... or as they look in the post after being entered through htmlentities with ent_quotes on: :'( :'-( this causes the entire message to disappear: $text = er

[PHP] Ereg problems

2004-03-25 Thread Jeff McKeon
Having some problems with ereg() [begin code] $string="Credit adjusted: $-1.32 to $48.68" ereg("([\\$(\\$-)][0-9]+\.[0-9]+)",$data[2],$found); While(list($index,$hits)=each($found)) { echo "$index , $hits"; } [end code] Returns 0

Re: [PHP] ereg problem

2004-03-12 Thread Newman Weekly.
Don't worry about this I worked out that the example was wrong (o; - Original Message - From: "Newman Weekly." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 13, 2004 1:59 PM Subject: [PHP] ereg problem This simple script is ment to chec

[PHP] ereg problem

2004-03-12 Thread Newman Weekly.
This simple script is ment to check to a user nae field but I have done something wrong. $pageUserNameValid This should be yes for foo bar. // Phil

Re: [PHP] ereg + performance problem

2004-01-02 Thread Martin Helie
Hi Mirek, thanks for pointing this out. This looks like a great site -- although, as you say, will require some [longer term] study. I'll have closer look at Smarty as well... "Mirek Novak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I think that smarty [ http://smarty

Re: [PHP] ereg + performance problem

2004-01-02 Thread Mirek Novak
Hi, I think that smarty [ http://smarty.php.net ] can do this for u. It has tag nesting and, of course, you can define your own tag as a plugin. As for performance problem - this is known "feature" of regexp. Solution is not simple. You, IMHO, have to rethink your approach. For parsing larger

[PHP] ereg + performance problem

2004-01-01 Thread Martin Helie
Hello, I'm writing a routine that recursively reads an HTML document, looking for "special tags". It's a template system, but contrary to what I've seen out there so far, no template engines allow for any kind of customization from within the document; they only seem to be variable replacement sys

Re: [PHP] ereg is failing on this simple test

2003-12-13 Thread Eugene Lee
On Fri, Dec 12, 2003 at 07:54:16PM -0800, Manuel Ochoa wrote: : : Why is this test failing? : : $data = "A Simple test."; : If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) { : echo "Valid text"; : } : else { : echo "Not valid text"; : } You can't use the character class "\s" within a range. And

RE: [PHP] ereg is failing on this simple test

2003-12-12 Thread Dave G
> Why is this test failing? > If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) { I'm very new to PHP, so I may be barking up the wrong tree, but what is that "s" doing after the slash? I don't know if it's the cause of the problem, but as far as I know it's superfluous. -- Yoroshiku! Dave G [EMAIL PROT

[PHP] ereg is failing on this simple test

2003-12-12 Thread Manuel Ochoa
Why is this test failing? $data = "A Simple test."; If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) { echo "Valid text"; } else { echo "Not valid text"; } I'm running PHP 4.34 on a windows pc. This function is new to me, any help would be appreciated.

[PHP] ereg

2003-09-12 Thread alexander sundli
I use this expression to remove oneline comments: iereg_replace("//([^\n]*)\n",'',$code); I need to make a check if this expression is inside a string. If it is, its not a comment. I think it has something to do with context.. Anyone who could help me? thanx -- PHP General Mailing List (http:

Re: [PHP] ereg & preg

2003-08-15 Thread Curt Zirzow
* Thus wrote Eddy-Das ([EMAIL PROTECTED]): > is there any syntax difference between > ereg() and preg() except preg needs / and /? There are a lot of differences in syntax. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) T

[PHP] ereg & preg

2003-08-15 Thread Eddy-Das
is there any syntax difference between ereg() and preg() except preg needs / and /? -- - Eddy Wong __ inframatrix internet solutions http://www.inframatrix.com/ ¥¿¤KEddy Regular Octa-Eddy [EMAIL PROTECTED]@ [EMAIL PROTECTED]@¡½¢ª¢© [EMAIL PROTECTED]@[EMAIL PROTE

[PHP] ereg() can't recognize characters such as èéêë...

2003-07-29 Thread Ivo Fokkema
Hi list, I read through the manual and tried to find something on google, but I didn't come to anything useful. It seems that the ereg()-family (I tried ereg(), eregi() and ereg_replace()) can't recognize any special characters such as èéêë etc. I tested this : and it returned a blank screen.

RE: [PHP] ereg problem?

2003-07-25 Thread Ford, Mike [LSS]
> -Original Message- > From: sven [mailto:[EMAIL PROTECTED] > Sent: 25 July 2003 10:35 > > by the way, it's to complicated. the brackets [ and ] are used for > cha-groups. you can leave them for only one char. so this > would be the same: > "\\n" (you have to escape the backslash with a b

Re: [PHP] ereg problem?

2003-07-25 Thread sven
by the way, it's to complicated. the brackets [ and ] are used for cha-groups. you can leave them for only one char. so this would be the same: "\\n" (you have to escape the backslash with a backslash) Curt Zirzow wrote: > * Thus wrote John W. Holmes ([EMAIL PROTECTED]): >> [EMAIL PROTECTED] wrote

Re: [PHP] ereg problem?

2003-07-24 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]): > [EMAIL PROTECTED] wrote: > > >who can tell me what's the pattern string mean. > >if(ereg("[\\][n]",$username)) > >{ > > /*Do err*/ > >} > > It's looking for a \ character or a \ character followed by the letter n > anywhere within the string $

Re: [PHP] ereg problem?

2003-07-24 Thread John W. Holmes
[EMAIL PROTECTED] wrote: who can tell me what's the pattern string mean. if(ereg("[\\][n]",$username)) { /*Do err*/ } It's looking for a \ character or a \ character followed by the letter n anywhere within the string $username. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/

[PHP] ereg problem?

2003-07-24 Thread chenqi1
who can tell me what's the pattern string mean. if(ereg("[\\][n]",$username)) { /*Do err*/ } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ereg question

2003-03-30 Thread Peter Houchin
Beauford, Jason, Build a bridge and get over it already sheeesh TYVMIA Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
gt; Sent: Monday, March 31, 2003 1:36 AM Subject: Re: [PHP] Ereg question > On Monday 31 March 2003 13:58, Beauford wrote: > > > I posted the information as I had it. I had no idea what the problem was > > and posted the information I thought was FULL and ACCURATE - > > Fu

Re: [PHP] Ereg question

2003-03-30 Thread Jason Wong
On Monday 31 March 2003 13:58, Beauford wrote: > I posted the information as I had it. I had no idea what the problem was > and posted the information I thought was FULL and ACCURATE - Full and accurate if taken literally are absolute terms and are objective not subjective. > if this isn't > g

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
s once. B. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 11:20 PM Subject: Re: [PHP] Ereg question > On Monday 31 March 2003 04:15, Beauford wrote: > > Just some more information. It appears tha

Re: [PHP] Ereg question

2003-03-30 Thread Jason Wong
On Monday 31 March 2003 04:15, Beauford wrote: > Just some more information. It appears that the session variable > $formsave["dob"] is causing the problem. If I echo the input $_POST['dob'] > it shows correctly, but when it's put into $formsave["dob"] the leading > and ending 0's are being stripp

RE: [PHP] Ereg question

2003-03-30 Thread John W. Holmes
> I thought trim only stripped white space.?. $formsave['dob'] is a > session variable. I have also found now that leading 0's are also being > stripped. > > foreach($HTTP_POST_VARS as $varname => $value) > $formsave[$varname] = trim($value, 50); > > If it's not there then the whole

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
--- Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Beauford'" <[EMAIL PROTECTED]>; "'PHP General'" <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 2:28 PM Subject: RE: [PHP] Ereg question > > I am usi

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
This is what I get when I echo $formsave["dob"] - 9/09/199. It was inputted as 09/09/1990. B. - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Beauford'" <[EMAIL PROTECTED]>; "'PHP General'" &l

Re: [PHP] Ereg question

2003-03-30 Thread Beauford
27;" <[EMAIL PROTECTED]>; "'PHP General'" <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 2:28 PM Subject: RE: [PHP] Ereg question > > I am using ereg to validate the format of a date entry (mm/dd/yy), but > if > > the year ends in a 0, it is bei

RE: [PHP] Ereg question

2003-03-30 Thread John W. Holmes
> I am using ereg to validate the format of a date entry (mm/dd/yy), but if > the year ends in a 0, it is being stripped and as such produces an error. > So > 1990 would be 199. The dob is being inputted by a form > > Here is my code: > > if (!ereg("^([0-9]{2})/([0-9]{2})/([0-9]{4})$", $form

[PHP] Ereg question

2003-03-30 Thread Beauford
I am using ereg to validate the format of a date entry (mm/dd/yy), but if the year ends in a 0, it is being stripped and as such produces an error. So 1990 would be 199. The dob is being inputted by a form Here is my code: if (!ereg("^([0-9]{2})/([0-9]{2})/([0-9]{4})$", $formsave["dob"], $pa

Re: [PHP] Ereg sass

2003-03-18 Thread CPT John W. Holmes
t; To: "php list" <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 3:33 AM Subject: [PHP] Ereg sass I'm not sure why, but I can't include a period in my eregi statement: [A-Za-z0-9_-.]* For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in /home/website/publ

Re: [PHP] Ereg sass

2003-03-18 Thread Ernest E Vogelsinger
At 10:36 18.03.2003, Jason k Larson said: [snip] >It's seeing the - as a range identifier, escape it to get the literal hyphen. > >How about this: >[a-zA-Z0-9_\-.]* > >In my tests, the period didn't need to be escaped with the \. [snip]---

Re: [PHP] Ereg sass

2003-03-18 Thread Jason k Larson
It's seeing the - as a range identifier, escape it to get the literal hyphen. How about this: [a-zA-Z0-9_\-.]* In my tests, the period didn't need to be escaped with the \. HTH, Jason k Larson Liam Gibbs wrote: I'm not sure why, but I can't include a period in my eregi statement: [A-Za-z0-9_-.]*

RE: [PHP] Ereg sass[Scanned]

2003-03-18 Thread Michael Egan
Try [A-Za-z0-9_\-\.]* -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: 18 March 2003 08:52 To: php list Subject: Re: [PHP] Ereg sass[Scanned] > try two backslashes to escape php special characters Tried that with the same result. > I'm not sure why,

Re: [PHP] Ereg sass

2003-03-18 Thread Liam Gibbs
> try two backslashes to escape php special characters Tried that with the same result. > I'm not sure why, but I can't include a period in my eregi statement: > > [A-Za-z0-9_-.]* > > For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in > /home/website/public_html/Functions.inc on l

Re: [PHP] Ereg sass

2003-03-18 Thread Hugh Danaher
try two backslashes to escape php special characters - Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 12:33 AM Subject: [PHP] Ereg sass I'm not sure why, but I can't incl

[PHP] Ereg sass

2003-03-18 Thread Liam Gibbs
I'm not sure why, but I can't include a period in my eregi statement: [A-Za-z0-9_-.]* For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in /home/website/public_html/Functions.inc on line 27 The same goes for [A-Za-z0-9_-\.]* Anyone know why?

Re: [PHP] ereg usage

2003-02-16 Thread Rick Emery
The problem is that it's looking for hyphen, - , immediately preceeding the end. Remove the $. - Original Message - From: "Peter Gumbrell" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, February 16, 2003 9:18 AM Subject: [P

Re: [PHP] ereg usage

2003-02-16 Thread Ernest E Vogelsinger
At 16:18 16.02.2003, Peter Gumbrell said: [snip] >Could someone please tell me why this code is not working: > >ereg ('^[A-H]*([0-9]+)-$', $rank, $matches); >$workshop_ID = $matches[1][2}; > >where $rank is something like C12-1 and I just need the C12 par

[PHP] ereg usage

2003-02-16 Thread Peter Gumbrell
Could someone please tell me why this code is not working: ereg ('^[A-H]*([0-9]+)-$', $rank, $matches); $workshop_ID = $matches[1][2}; where $rank is something like C12-1 and I just need the C12 part. Many thanks Peter Gumbrell [EMAIL PROTECTED] -- PHP General Mailing List (http://www.ph

Re: [PHP] ereg.

2002-12-18 Thread liljim
out > and see what works. > > ---John Holmes... > > - Original Message - > From: "Wico de Leeuw" <[EMAIL PROTECTED]> > To: "Anders Thoresson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, December 18, 2002 11:26 AM > Subj

Re: [PHP] ereg.

2002-12-18 Thread 1LT John W. Holmes
riginal Message - From: "Wico de Leeuw" <[EMAIL PROTECTED]> To: "Anders Thoresson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 11:26 AM Subject: Re: [PHP] ereg. ^ is not in this case Try if(!ereg("^([a-zA-ZåÅäÄöÖ]{4,20}

Re: [PHP] ereg.

2002-12-18 Thread Wico de Leeuw
At 17:26 18-12-02 +0100, Wico de Leeuw wrote: ^ is not in this case Cancel that, i don't think thats true anyway if(!ereg("^[a-zA-ZåÅäÄöÖ]{4,20}\$", $_REQUEST['f_name'])) { Should work i think Gr, Try if(!ereg("^([a-zA-ZåÅäÄöÖ]{4,20})\$", $_REQUEST['f_name'])) { Added the $ at the end else

Re: [PHP] ereg.

2002-12-18 Thread Wico de Leeuw
^ is not in this case Try if(!ereg("^([a-zA-ZåÅäÄöÖ]{4,20})\$", $_REQUEST['f_name'])) { Added the $ at the end else the could be more then 20 chars Greetz At 17:20 18-12-02 +0100, Anders Thoresson wrote: What's wrong with the following regular expression? As far as I can se, only alphabetic ch

[PHP] ereg.

2002-12-18 Thread Anders Thoresson
What's wrong with the following regular expression? As far as I can se, only alphabetic characters including the special swedish ones, should be let through, but whatever character passed on in $_REQUEST['f_name'] passes the test? if(!ereg("(^[a-zA-ZåÅäÄöÖ]{4,20})", $_REQUEST['f_name'])) { e

[PHP] Ereg headache: got an Aspirin

2002-11-21 Thread Mako Shark
Finally, I found y answer to my ereg/grep question. Thanks to all those who took a stab at it. You led me to the answer. For all those interested in reg-parsing comma-delimited lists, here is what I searched for: '^$' It was much simpler than I thought it would be. Thanks again!

[PHP] Ereg headache

2002-11-15 Thread Mako Shark
I have a real problem that I can't seem to figure out. I need an ereg pattern to search for a certain string (below). All this is being shelled to a Unix grep command because I'm looking this up in very many files. I've made myself a that contains in the value attribute a list of comma-delimited

[PHP] ereg (Why, Does sort of work)?

2002-11-02 Thread David Jackson
I'm comparing the values of a check box, against another form field, and it sort of works, but I don't understand why (A better solution? is listed below it? TIA, David Jackson --- And part of the HTML Form: --- Account Type: Asset Liability --

[PHP] Ereg Help

2002-10-25 Thread David Pratt
Hi William, try this: ^(#[0-9]{2}-[0-9]{2,4} Item Description: [\$][0-9]{1,3}[\.][0-9]{2})$ I've just been putting a number of expressions together for validation myself. Regards, Dave Pratt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ereg help

2002-10-25 Thread Rick Emery
- Original Message - From: "William Glenn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 25, 2002 10:34 AM Subject: [PHP] Ereg help Hey all, I've been fighting this all night, I need a bit of help. I have a string like. #21-935 Item Des

[PHP] Ereg help

2002-10-25 Thread William Glenn
Hey all, I've been fighting this all night, I need a bit of help. I have a string like. #21-935 Item Description: $35.95 Where the part # could be 10-2034 a combination of 2 and 3 or 4 digits, and the price could be a combination of 1,2,3 . 2 digits. I want to chop that string into Part # / Des

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(

[PHP] ereg

2002-05-02 Thread Jason Soza
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("%20", "_", strtolower($original_name; Basically, I wan

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

2002-04-23 Thread John Holmes
eas? ---John Holmes... > -Original Message- > From: John Holmes [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 6:01 PM > To: [EMAIL PROTECTED] > Subject: [PHP] ereg() not matching same text each time script is run... > > Okay...I'm really at a loss for this... >

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

2002-04-23 Thread John Holmes
Okay...I'm really at a loss for this... (PHP 4.0.6 on Redhat Linux) I've written a little script that shows the top referrers for http://www.falkware.com. Problem is...the script is supposed to take "www.domain.com" and strip out only the "domain" to show. It does this, but only some of the tim

[PHP] ereg size limit???

2002-04-21 Thread SP
I am trying to validate my input with ereg but I get the error "Warning: REG_BADBR" when I try over 255 characters. Is there anyway around this? Works = if(eregi('^[A-Za-z]{1,255}$', "test sentence")) echo "valid input"; Doesn't Work if(eregi('^[A-Za-z]{1,256}$', "test senten

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-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 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 > -

[PHP] Ereg ()

2002-04-16 Thread DrouetL
Hi, 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 - may contains some special chars (ex : % ! : ; , )but not in first or last posi

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-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 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
> 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 val petruchek
t; To: "Php-Db-Help (E-mail)" <[EMAIL PROTECTED]>; "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 1:04 PM Subject: [PHP] ereg-digits only... > > How do I check a string for it to only contain numbers? > > >> > >

[PHP] ereg-digits only...

2002-02-12 Thread B. Verbeek
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 some feedback... regards, Bart -- PHP General Mailing List (http://www.php.net

[PHP] ereg

2002-02-11 Thread Christoph Starkmann
Hi there! Is there any mean to tell PHP to use ereg etc. greedy? Thanx, Kiko - It's not a bug, it's a feature. [.nfq] christoph starkmann tel.: 0821 / 56 97 94 34 fax.: 0821 / 56 97 94 38 http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php

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 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
; > > 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 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 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

  1   2   >