On 7 June 2010 18:11, Floyd Resler wrote:
> I need to test for the existence of at least one punctuation (@#$%')
> character in a string. Â What would my regular expression be?
>
I'm certain you'd be capable of finding out if you read a bit on
http://www.regular-expressions.info/ or any of the n
On Mon, 2010-06-07 at 12:11 -0400, Floyd Resler wrote:
> I need to test for the existence of at least one punctuation (@#$%')
> character in a string. What would my regular expression be?
>
> Thanks!
> Floyd
>
>
/[...@#\$%\']/
That will match against at least one of those characters you sp
I need to test for the existence of at least one punctuation (@#$%') character
in a string. What would my regular expression be?
Thanks!
Floyd
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Jul 03, 2002 at 12:00:50PM -0400, Martin Clifford wrote:
>
> Does [a-zA-Z0-9] (yes, I know [:alnum:] is the same) mean that there can
> be a number, but it has to follow a letter? Or would you just do
> [a-zA-Z][0-9] to do that?
Your second question/statement is correct.
--Dan
--
On Wednesday, July 3, 2002, at 12:00 PM, Martin Clifford wrote:
> Does [a-zA-Z0-9] (yes, I know [:alnum:] is the same) mean that there
> can be a number, but it has to follow a letter? Or would you just do
> [a-zA-Z][0-9] to do that?
That bracketed construction is called a character class.
This may sound like a stupid question, but... within a regular expression, are the
values in brackets evaluated consecutively, or no? For example:
Does [a-zA-Z0-9] (yes, I know [:alnum:] is the same) mean that there can be a number,
but it has to follow a letter? Or would you just do [a-zA-Z]
:[EMAIL PROTECTED]]
>Sent: Thursday, August 02, 2001 5:16 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] another REGEX question
>
>I have a string can look like either of the following:
>some stuff
>some stuff
>
>I want to use eregi_replace to take out the first p tag whether it b
I have a string can look like either of the following:
some stuff
some stuff
I want to use eregi_replace to take out the first p tag whether it be or with a space
I assumed that $str = eregi_replace ("", " ",$str);
but it matches the entire string and thus turns the whole string into one spac
Y'all should also be aware that there is a http://php.net/strip_tags
function to rip out all the HTML tags except a select few you want to
allow...
> Preg functions are faster, though. And, if you're interested in
> little speed tweaks, use single quotes - ' - rather than double
> quotes - " - he
nience :)
Julian
8/2/01 5:19:03 PM, "Jack Dempsey" <[EMAIL PROTECTED]> wrote:
>Try
>$str = preg_replace("", " ",$str);
>
>jack
>
>-Original Message-
>From: Julian Simpson [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, August 02, 2001
" - here. With double quotes, PHP searches the quoted string
>for variables or escape characters to replace.
>
> -steve
>
>>
>>-Original Message-
>>From: Julian Simpson [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, August 02, 2001 5:16 PM
>>To
> >Preg functions are faster, though. And, if you're interested in
> >little speed tweaks, use single quotes - ' - rather than double
> >quotes - " - here. With double quotes, PHP searches the quoted string
> >for variables or escape characters to replace.
> >
Try
$str = preg_replace("", " ",$str);
jack
-Original Message-
From: Julian Simpson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 5:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] another REGEX question
I have a string can look like either of the followi
13 matches
Mail list logo