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

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.

RE: [PHP] another REGEX question

2001-08-03 Thread Steve Edberg
At 5:19 PM -0400 8/2/01, Jack Dempsey wrote: >Try >$str = preg_replace("", " ",$str); > >jack Or $str = eregi_replace(']*>', ' ', $str); This matches , then the trailing >. Preg functions are faster, though. And, if you're interested in little speed tweaks, use single quotes - ' - rat

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
hahah that had two interesting effects the first was that it left the < > and the second was that it turned off all the highlighting in my editor due to the "?>" any idea how to include the braces in the match and perhaps not using the ?> string for the sake of convenience :) Julian 8/2/01

RE: [PHP] another REGEX question

2001-08-02 Thread Jack Dempsey
ything...so, unless you have the s flag enabled, the . will not match a newline, while the negation will... Just a lil extra info jack -Original Message- From: Julian Simpson [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 02, 2001 5:42 PM To: Steve Edberg; [EMAIL PROTECTED] Subject: RE: [P

Re: [PHP] another REGEX question

2001-08-02 Thread James, Yz
Hi Julian, personally, I'd take out both tags, using something like: $str = preg_replace("/<\/?p.*?>/i", "", $str); Which gets rid of: Or any case insensitive matches. That's probably just me though ;) James. "Julian Simpson" <[EMAIL PROTECTED]> wrote in message news:20010802214051.BGVV2

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 following: some stuff some stu