Re: [PHP] Regex to catch s

2008-05-07 Thread Aschwin Wesselius
Ryan S wrote: Hey! Thansk for replying! It is obvious I haven't had my caffeine yet. This is my last try to get the pattern straight: hello hello those hello hello this rose hello nose hello that hello END_OF_HTML; $tags = array(); $tags[] = 'p'; $tags[] = 'a'; $attr = array(); $attr[] =

Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Jon L.
Pretty close. The only thing I'd suggest is a different way of wording step 2: Can contain anything but '>' until step 3. As for the switches/modifiers (Uis), check out: http://us.php.net/manual/en/reference.pcre.pattern.modifiers.php U = ungreedy i = case-insensitive (|p| matches 'p' and/or 'P'

Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Ryan S
> http://www.ezee.se/tests/para_regex2.php.txt Yep, sorry... Just add the s preg_match_all('|]*>(.*)|Uis', $myText, $myArray); Swett! It works! If you _do get time_, would love to know the actual meaning of |]*>(.*)|Uis because although I do appreciate the help and the code, am learni

Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Shawn McKenzie
Ryan S wrote: preg_match_all('|]*>(.*)|Ui', $myText, $myArray); Hey! Thanks for replying. Your preg_match_all works like a charm, but for some reason catches only 8 out of 9 paragraphs... its really weird. I have upped the test page to http://www.ezee.se/tests/para_regex2.php.txt so you

Re: [PHP] Regex to catch s (weird result)

2008-05-07 Thread Ryan S
preg_match_all('|]*>(.*)|Ui', $myText, $myArray); Hey! Thanks for replying. Your preg_match_all works like a charm, but for some reason catches only 8 out of 9 paragraphs... its really weird. I have upped the test page to http://www.ezee.se/tests/para_regex2.php.txt so you can have a look

Re: [PHP] Regex to catch s

2008-05-06 Thread Shawn McKenzie
Ryan S wrote: To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each "block" of text has a or a < class="something"> tag... anybody have any regex that will catch each of these paragraphs and p

Re: [PHP] Regex to catch s

2008-05-06 Thread Aschwin Wesselius
Aschwin Wesselius wrote: Aschwin Wesselius wrote: Ryan S wrote: Hey all! To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each "block" of text has a or a < class="something"> tag... anybody h

Re: [PHP] Regex to catch s

2008-05-06 Thread Aschwin Wesselius
Aschwin Wesselius wrote: Ryan S wrote: Hey all! To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each "block" of text has a or a < class="something"> tag... anybody have any regex that will ca

Re: [PHP] Regex to catch s

2008-05-06 Thread Aschwin Wesselius
Ryan S wrote: Hey all! To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each "block" of text has a or a < class="something"> tag... anybody have any regex that will catch each of these paragraph

Re: [PHP] Regex to catch s

2008-05-05 Thread Ryan S
> To say I suck at regex is an understatement so really need any help I can > get on this, I have a page of text with different html tags in them, but each > "block" of text has a or a < class="something"> tag... anybody have any > regex that will catch each of these paragraphs and put then

Re: [PHP] Regex to catch s

2008-05-05 Thread Eric Butera
On Mon, May 5, 2008 at 9:59 PM, Ryan S <[EMAIL PROTECTED]> wrote: > To say I suck at regex is an understatement so really need any help I can > get on this, I have a page of text with different html tags in them, but each > "block" of text has a or a < class="something"> tag... anybody have any

[PHP] Regex to catch s

2008-05-05 Thread Ryan S
Hey all! To say I suck at regex is an understatement so really need any help I can get on this, I have a page of text with different html tags in them, but each "block" of text has a or a < class="something"> tag... anybody have any regex that will catch each of these paragraphs and put then