? 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
? 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
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
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
- 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
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:
/ '.,-)(*^%#
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.
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--
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
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
: [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
[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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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 =
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
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
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!=.
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
- - -- - -
- 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
=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
: 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
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
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
How do i change all 'a href=anything/here.html' to 'a
href=file.php?file=anythinghere.php'
any help out there?
]
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
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
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
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
]
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
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
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
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
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?
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,
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).
- 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
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. +
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
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
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
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
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,
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
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
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]?
101 - 160 of 160 matches
Mail list logo