Re: [PHP] Another RegEx Question

2010-06-07 Thread Peter Lind
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

Re: [PHP] Another RegEx Question

2010-06-07 Thread Ashley Sheridan
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

[PHP] Another RegEx Question

2010-06-07 Thread Floyd Resler
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

Re: [PHP] Another Regex Question (General)

2002-07-03 Thread Analysis & Solutions
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 --

Re: [PHP] Another Regex Question (General)

2002-07-03 Thread Erik Price
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.

[PHP] Another Regex Question (General)

2002-07-03 Thread Martin Clifford
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]

RE: [PHP] another REGEX question

2001-08-03 Thread Steve Edberg
:[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

[PHP] another REGEX question

2001-08-03 Thread Julian Simpson
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

Re: [PHP] another REGEX question

2001-08-03 Thread Richard Lynch
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

RE: [PHP] another REGEX question

2001-08-02 Thread Julian Simpson
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

RE: [PHP] another REGEX question

2001-08-02 Thread Jack Dempsey
" - 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

Re: [PHP] another REGEX question

2001-08-02 Thread James, Yz
> >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. > >

RE: [PHP] another REGEX question

2001-08-02 Thread Jack Dempsey
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