Re: [PHP] Re: Regex help

2008-09-09 Thread Jochem Maas
Jason Pruim schreef: On Sep 9, 2008, at 12:18 PM, Jochem Maas wrote: ... I'll have to do some searching :) always ;-) The problem with the internet is there is so much out there... Trying to weed the crap from the food can be a long digestive process which ends up with MORE crap comin

Re: [PHP] Re: Regex help

2008-09-09 Thread Jason Pruim
On Sep 9, 2008, at 12:18 PM, Jochem Maas wrote: Jason Pruim schreef: On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote: Jason Pruim wrote: On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's bett

Re: [PHP] Re: Regex help

2008-09-09 Thread Jochem Maas
Jason Pruim schreef: On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote: Jason Pruim wrote: On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.sch

Re: [PHP] Re: Regex help

2008-09-09 Thread Jason Pruim
On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote: Jason Pruim wrote: On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.schreurprinting.com/jaso

Re: [PHP] Re: Regex help

2008-09-09 Thread Per Jessen
Jason Pruim wrote: > > On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: > >> Jason Pruim wrote: >>> Hey everyone, >>> Not completely specific to php but I know you guys know regex's >>> better then I do! :) >>> I am attempting to match purl.schreurprinting.com/jasonpruim112 to >>> purl.schreurpr

Re: [PHP] Re: Regex help

2008-09-09 Thread Nathan Rixham
Jason Pruim wrote: On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.schreurprinting.com/jasonpruim112 to purl.schreurprinting.com/p.php?purl=j

Re: [PHP] Re: Regex help

2008-09-09 Thread Jason Pruim
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote: Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.schreurprinting.com/jasonpruim112 to purl.schreurprinting.com/p.php?purl=jasonpruim112 Here

[PHP] Re: Regex help

2008-09-09 Thread Nathan Rixham
Jason Pruim wrote: Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.schreurprinting.com/jasonpruim112 to purl.schreurprinting.com/p.php?purl=jasonpruim112 Here are my current matching patterns:

[PHP] Re: REGEX Help Please

2005-09-19 Thread Mark Rees
> I am trying to implement a regular expression so that I have a number > between 0.00 and 1.00. the following works except I can go up to 1.99 > > $regexp = "/^[0-1]{1}.[0-9]{2}/"; > You could always do this, unless you are set on using a regular expression: if($num>=0 && $num<=1.01){ echo numb

[PHP] Re: Regex help

2005-06-06 Thread Al
RaTT wrote: Hi Guys, I am currently creating a once off text parser for a rather large document that i need to strip out bits of information on certain lines. The line looks something like : "Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221 Website: http://www.urlhere.co

[PHP] Re: Regex help

2005-01-28 Thread Stian Berger
On Fri, 28 Jan 2005 14:59:29 -0700, <[EMAIL PROTECTED]> wrote: OK, this is off-topic like every other "regex help" post, but I know some of you enjoy these puzzles :) I need a validation regex that will "pass" a string. The string can be no longer than some maximum length, and it can contain any ch

Re: [PHP] Re: regex help and file question

2004-08-07 Thread PHP Gen
> Hi, > > I can't answer your regexp question but some > thoughts on file() etc.: > - file() returns the contents line by line as an > array, so this makes only > sense if you need the contents in this form, e.g. > for looping through each > line and applying a function or whatever > - fread() re

[PHP] Re: regex help and file question

2004-08-07 Thread Torsten Roehr
"Php Gen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am just starting out with regex (and classes) so am > not sure how to do this... > > I am seeing if a HTML file exists, if yes, I am using > file_get_contents to get the entire HTML file into a > string. > > In the HTML

Re: [PHP] Re: regex help needed -- Solved! Thanks!

2004-08-02 Thread Fabrice Lezoray
-Original Message- From: Fabrice Lezoray [mailto:[EMAIL PROTECTED] Sent: Sunday, August 01, 2004 2:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: regex help needed hi M. Sokolewicz a écrit : You could try something like: $return = preg_replace('#(.*)#Uie', 'str_replace(&q

RE: [PHP] Re: regex help needed -- Solved! Thanks!

2004-08-01 Thread Kathleen Ballard
What are 'Uie' and 'sie'? Thanks again! Kathleen -Original Message- From: Fabrice Lezoray [mailto:[EMAIL PROTECTED] Sent: Sunday, August 01, 2004 2:52 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: regex help needed hi M. Sokolewicz a écrit : > You could try so

[PHP] Re: regex help needed

2004-08-01 Thread Fabrice Lezoray
hi M. Sokolewicz a écrit : You could try something like: $return = preg_replace('#(.*)#Uie', 'str_replace("", "", "$1")'); - Tul Kathleen Ballard wrote: Sorry, Here is the code I am using to match the tags: .* I think this mask is better : `.*?`sie I have removed all the NL and CR chars from the

[PHP] Re: regex help needed

2004-08-01 Thread M. Sokolewicz
You could try something like: $return = preg_replace('#(.*)#Uie', 'str_replace("", "", "$1")'); - Tul Kathleen Ballard wrote: Sorry, Here is the code I am using to match the tags: .* I have removed all the NL and CR chars from the string I am matching to make things easier. Also, I have run tidy

Re: [PHP] Re: Regex Help

2004-01-27 Thread Ben Ramsey
Why do you need to remove the delimeters? If you remove them, then it makes it quite difficult to get the data you need. If you want to display the date and race type without the square brackets around them, then use $matches[0][1] and $matches[1][1] instead of $matches[0][0] or $matches[1][0

Re: [PHP] Re: Regex Help

2004-01-27 Thread karthikeyan.balasubramanian
"Karthikeyan" <[EMAIL PROTECTED]> Sent: Monday, January 26, 2004 11:56 PM Subject: [PHP] Re: Regex Help > Check the PHP manual for preg_match() > (http://us3.php.net/manual/en/function.preg-match.php). > > I did play around with it a little bit, and I think I've got a st

[PHP] Re: Regex Help

2004-01-26 Thread Ben Ramsey
Check the PHP manual for preg_match() (http://us3.php.net/manual/en/function.preg-match.php). I did play around with it a little bit, and I think I've got a starting point for you to work with. Try out this code and then play around with it to get the results you need. $matches[2][0] will hol

[PHP] Re: Regex help please

2004-01-11 Thread Manuel Vázquez Acosta
Try this: $pattern = '#function (\w+)\(((?:\$\w+(?:,\s*\$\w+)*?)|\s*)\)\s*\{[.\s]*((?:return\s+[^;]*\s*;)|)[ .\s]*#m'; Notice that \w means: A "word" character is any letter or digit or the underscore character, that is, any character which can be part of a Perl "word". Though, any regexp for thi

Re: [PHP] Re: RegEx -- help

2003-10-10 Thread Robert Cummings
On Fri, 2003-10-10 at 16:18, Curt Zirzow wrote: > On Fri, 10 Oct 2003 14:01:00 -0400 (EDT), Lists <[EMAIL PROTECTED]> wrote: > > > I do not know if this is the right list, but if someone could help me > > with the following > > Sure, I'll be glad to help. > > > > I need a function that does th

[PHP] Re: RegEx -- help

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 14:01:00 -0400 (EDT), Lists <[EMAIL PROTECTED]> wrote: I do not know if this is the right list, but if someone could help me with the following Sure, I'll be glad to help. I need a function that does this: I'm not sure if you want me to write the code that does this for you,

[PHP] Re: regex help?

2003-07-21 Thread sven
hi john, try a regex like this: '/]*>(.*)/i' ciao SVEN John Herren wrote: > Can't seem to get this to work... > > trying to yank stuff xxx from > xxx > > and stuff yyy from > >  yyy > > preg_match("| (.*)$|i", $l, $regs); > > works for the second example, even though it isn't the correct way, > bu

[PHP] Re: Regex help needed

2003-07-16 Thread Nomadeous
First, the prob you got : WARNING comes from the following error: (\s+face=\"Verdana, Arial, Helvetica, sans-serif\"|)> After the | (OR) sign, you must define another case, example: echo eregi_replace ("(\s*)\s*\s*purchasing power parity", '%POWER%', 'sdsdssPurchasing power parity'); Secondl

Re: [PHP] Re: Regex Help with -> ?

2003-06-27 Thread Gerard Samuel
sven wrote: looks like id3v2 ;-) how about this: $string = "<[TIT2]> ABC <[TPE1]> GHI <[TALB]> XYZ"; $pattern = "/<\[TIT2\]>([^<]*)/"; // matches anything exept '<'; till '<' or end of string preg_match($pattern, $string, $match); var_export($match); Yeah, Im trying to figure out a way to parse t

[PHP] Re: Regex Help with -> ?

2003-06-27 Thread sven
looks like id3v2 ;-) how about this: $string = "<[TIT2]> ABC <[TPE1]> GHI <[TALB]> XYZ"; $pattern = "/<\[TIT2\]>([^<]*)/"; // matches anything exept '<'; till '<' or end of string preg_match($pattern, $string, $match); var_export($match); hint to your regex: either use quantifier '*' (0-n times)

[PHP] Re: regex help

2002-09-05 Thread Richard Lynch
> >$str = 'hi my friend! this message uses html entities href="http://www.trini0.org";>test!'; >$str = preg_replace('/(.*<\/a>)/', >htmlspecialchars("$1"), $str); Maybe I'm missing something here, but can't you just do: $str = htmlspecialchars($str); -- Like Music? http://l-i-e.com/artists.

[PHP] Re: Regex help

2001-08-22 Thread Robin Vickery
[EMAIL PROTECTED] (Stefen Lars) writes: > In the Apache config file, we have the following directive: > > SetEnvIfNoCase Referer "^http://www.oursite.com/"; local_ref=1 > > > Order Allow,Deny > Allow from env=local_ref > > > We use this to prevent people from directly linking to .gif and