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

2002-01-31 Thread Edward van Bilderbeek - Bean IT
? 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] ereg et all Ahhh, ok makes more sense now. Although, I don't

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

2002-01-31 Thread Richard Crawford
? 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] ereg et all Ahhh, ok makes more sense now

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

2002-01-31 Thread Richard Crawford
IT [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 that, you will have

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

2002-01-31 Thread Edward van Bilderbeek - Bean IT
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. Try eregi_replace(this,b\\1/b,$str); That should do it, though I

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

2002-01-31 Thread Richard Crawford
- Original Message - From: Richard Crawford [EMAIL PROTECTED] To: Edward van Bilderbeek - Bean 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

[PHP] Ereg/replace/i/ or something ??

2002-01-30 Thread B. Verbeek
Hello, I want to check the data from a form-field if it excists only of digits (0-9) and nothing else. How do I use the ereg()-function for this? ereg([0-9],$cust_tel, $cust_tel); It is also to turn it around but then the pattern will get larger because it has to contain: / '.,-)(*^%#

[PHP] ereg(i) for form input validation for SQL - tutorial?

2002-01-27 Thread Simon H
Does anyone know of a good tutorial for using ereg and eregi to validate standard fields for SQL input (i'm using PearDB). Typically the type of validation that I think I need would be, firstly to detect invalid characters, or special characters, or things that can screw up the SQL Query.

[PHP] ereg

2002-01-10 Thread Kunal Jhunjhunwala
This is my code : ereg(!--start--(.*)!--stop--, $lineofhtml, $output); The problem is that, with !--start--(.*)!--stop-- it matches everthing from the first !--start-- to the last !--stop--... hence it appears its all in one array... what I need to do is tell it to stop at the first !--stop--

Re: [PHP] ereg

2002-01-10 Thread Jimmy
Hi Kunal, ereg(!--start--(.*)!--stop--, $lineofhtml, $output); ereg(!--start--([^!--stop--]*)!--stop--, $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

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] ereg Hi Kunal, ereg(!--start--(.*)!--stop--, $lineofhtml

Re: [PHP] ereg

2002-01-10 Thread Kunal Jhunjhunwala
: [PHP] ereg what about ? ereg(!--start--(.*?)!--stop--, $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

RE: [PHP] ereg

2002-01-10 Thread Rasmus Lerdorf
[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 PROTECTED] To: Kunal Jhunjhunwala [EMAIL PROTECTED] Cc: php-list [EMAIL PROTECTED

[PHP] ereg help

2001-12-03 Thread Valentin V. Petruchek
- 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 not new for php, but have no experience working with ereg functions. My problem is the following: i have string

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

Re: [PHP] ereg help

2001-12-03 Thread J Smith
6:35 PM Subject: [PHP] ereg help I'm not new for php, but have no experience working with ereg functions. My problem is the following: i have string.. for example $s=id {name,title,nick} [http://www.php.net];; i want to break it in several parts: $p[0]=id; $p[1][0] =name; $p[1][1

[PHP] ereg

2001-11-23 Thread Christoph Starkmann
As far as I can say, a simple ereg-command is always greedy, isn't it? Can you tell me how to switch greedy off? I want to find everything between the start- and end-php-tags: $phpIncludes = array(); ereg(\?php.*\?\, $html, $phpIncludes); where $html contains the entire page, containing one

[PHP] Ereg Bug

2001-11-09 Thread js
I'm ready to rip my hair out! I have a form which submits to a script to generate an image using the info on the form. I am trying to center the text over the image, and this application requires the use of variable-width fonts. So I am using a very basic regex to check for an all-caps

Re: [PHP] ereg checking if its only numbers

2001-10-05 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

Re: [PHP] ereg checking if its only numbers

2001-10-05 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 Aitken

[PHP] ereg checking if its only numbers

2001-10-04 Thread Chris Aitken
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 numbers and nothing else $string1 = 123456789 $string2 = 123456abc how

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 been

RE: [PHP] ereg checking if its only numbers

2001-10-04 Thread Maxim Maletsky \(PHPBeginner.com\)
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 [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 9:34 PM To: PHP General

Re: [PHP] ereg checking if its only numbers

2001-10-04 Thread Evan
try: ? if(ereg([0-9]{9}, $string)){ echo Success, 9 numbers!; } else { echo Failure, not 9 numbers.; } ? 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

[PHP] ereg

2001-09-30 Thread Matthew Delmarter
How do I use ereg to check for MSIE 5.5 and above. eg: eregi((MSIE.[56]),$HTTP_USER_AGENT) This only gets version 5 and 6 ... but I want 5.5 and above. Any ideas? Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

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

[PHP] ereg expr guru

2001-09-24 Thread Dave VanAuken
text file [other stuff] #%start dynamic %# #%start site [identifier] %# [contents] #%stop site [identifier] %# #%start site [identifier] %# [contents] #%stop site [identifier] %# #%start site [identifier] %# [contents] #%stop site [identifier] %#... #%stop dynamic %# [other stuff] already have

Re: [PHP] ereg question

2001-09-02 Thread Papp Gyozo
documentation. - Original Message - From: js [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 02, 2001 3:05 AM Subject: [PHP] ereg question In the Leon Atkinson Core PHP book, in his ereg example he states that ereg will only return the first match on a line. Can anyone confirm

[PHP] ereg question

2001-09-01 Thread js
In the Leon Atkinson Core PHP book, in his ereg example he states that ereg will only return the first match on a line. Can anyone confirm or deny this? Thanks, Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP] ereg()

2001-08-28 Thread Ben Quinn
Hi all Say i had text similar to below Cairns Fine Mareeba Fine Innisfail Fine I'm using the following code to grab the weather forecast for each of those towns $GrabURL = forecast_map_data.txt; $GrabStart = PROVINCIAL CITY; $GrabEnd = UV ratings; $file =

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

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: hi, I wanna

[PHP] ereg() help, plz

2001-07-14 Thread McShen
hi, I wanna print out all files in a directory. But i wanna exclude ., .., head.jpg, and all files that start with tn_ Here is my script, but it didn't work. Please help me to solve this problem. Thank You. -my script- while ($file_name = readdir($dir2)) if (($file_name!=.

[PHP] ereg parse error problem

2001-07-12 Thread Lara J. Fabans
Hi, friends, I'm receiving a parse error on the if (ereg... ) lines of this code. I looked at the online manual and modeled my two ereg's after it. When I kept getting parse errors, I decided to copy the original from the manual into my code, and it too received a parse error. Can someone

Re: [PHP] ereg parse error problem

2001-07-12 Thread Philip Murray
- - -- - - - Original Message - From: Lara J. Fabans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 1:59 PM Subject: [PHP] ereg parse error problem Hi, friends, I'm receiving a parse error on the if (ereg... ) lines of this code. I looked at the online

Re: [PHP] ereg questions

2001-05-24 Thread Dan Lowe
=anything.html ? 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] ereg questions On Thu, 24 May 2001 01:01:16 +0800, Ker Ruben

Re: [PHP] ereg questions

2001-05-24 Thread Ker Ruben Ramos
: 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 to whatever the parentheses surrounded during the match. So in this case you have

[PHP] ereg function

2001-05-24 Thread Jay Paulson
hello- I have a pretty easy question for some of you. I'm using the ereg function and it's not returning a true or false after it runs. Below is the code snippet I'm using. echo ereg(^[a-zA-Z]$, $fname); as you can see I'm just looking to make sure the variable $fname just has characters

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 variable is a

[PHP] ereg questions

2001-05-23 Thread Ker Ruben Ramos
How do i change all 'a href=anything/here.html' to 'a href=file.php?file=anythinghere.php' any help out there?

Re: [PHP] ereg questions

2001-05-23 Thread Ker Ruben Ramos
] 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 'a href=anything/here.html' to 'a href=file.php?file=anythinghere.php' any help out there? I would go: $string

[PHP] ereg issues

2001-05-10 Thread Jerry Lake
I'm feeling a bit stupid today how do I truncate a string to the first two [a-zA-Z] characters ? this sure isn't working snip $test = jerry; $test = ereg_replace(^\w*, ^[a-zA-Z]{2} ,$test); /snip Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier

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

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 a \w a word character, meaning a-zA-Z_0-9

Re: [PHP] ereg issues

2001-05-10 Thread Jack Dempsey
] 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 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

RE: [PHP] ereg issues

2001-05-10 Thread Jerry Lake
To: 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] [mailto:[EMAIL PROTECTED]]On Behalf Of Jack Dempsey Sent

[PHP] ereg

2001-03-31 Thread Michael Hall
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 expression to handle spaces (internal, not at the beginning or end). Thanks

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 expression

[PHP] ereg match problem

2001-02-20 Thread W.D.
I'm testing email address, but want to test not only characters but the @ sign and for .com, .net, .org, or .tv. How would I include all of these? $test = $email if( ereg("[a-zA-Z0-9]+)\@([a-zA-Z0-9]+)\.comhow would I include the rest?

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 .com,

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

[PHP] ereg problem

2001-02-14 Thread Janet Valade
I am using the following statement to check phone numbers. 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 other characters, e.g. +

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 other

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 problem In arti

Re: [PHP] ereg problem

2001-02-14 Thread CC Zona
ry 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)) { Can anyone tell me why this works for every character except the -. It doesn't see the hyphen as a

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 - needs to be immediately after

[PHP] ereg everything

2001-02-07 Thread Matthew Ley
I am creating an interface for a customer where they will be creating there own db and I was wondering if there was an ereg or ereg_replace function that would get rid of all the bs in one fail swoop. I am already converting spaces to underscores with ereg_replace. Thanks in advance,

[PHP] ereg()

2001-01-29 Thread kaab kaoutar
Hi is the following right? ereg("[a-zA-Zéêèë\sbàäïüöûâç-]", $firstname) cause even when i type a number it accepts it ! however i want only letters - and space ! thanks _ Get Your Private, Free E-mail from MSN Hotmail at

RE: [PHP] ereg()

2001-01-29 Thread Maxim Maletsky
axim Maletsky", " Maxim Maletsky " but not "Maxim Maletsky, jr" or even "MaximMaletsky " Cheers, Maxim Maletsky -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 7:32 PM To: [EMAIL PROTECTED] Subject

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

2001-01-12 Thread Ted Goranson
Friends-- I have a script that processes another script for display. I change all variables named similar to "$Help1x1" to Help: The following line accomplishes this readily when used in a .php suffixed script when called directly from browser. $content = ereg_replace ("[\$]Help[0-9]x[a-z]?

<    1   2