| Mercury | digitok: Did you remember the /g at the end? |
| digitok | yep plus he's using php |
| simcop2387 | perlbot pcre |
| perlbot | PCRE is crap. It is hardly comparable to Perl's regular expression engine. Don't bother inquiring for help with a regular expression in perl related channels as the answer you'll get will most likely not work since PCRE is missing most of the "powerful" features that perl's regex engine contains. See also: LPBD |
| digitok | he basically wants 1 line, $str = blah; preg_match_all(blah,$str,$matchs); and that's it thanks for that useless piece of info there er, 2 lines or whatever |
| sili | RT takes long to install |
| digitok | i still think it'd be easier just to preg_replace the tags with '' and do another match to extract all the words based on his specifications |
| simcop2387 | probably |
| Mercury | digitok: I can not imagine why there is any benefit at all to the restrictions of one regex for the whole job that is worth the time, energy, or effort required to figure out how to do what amounts to a nearly impossible task. |
| digitok | but apparently he's a "fan" of single expressions ~_~ |
| Mercury | digitok: I do see how to do it, but the evil is just too much to worry about. |
| digitok | yeh |
| magic_user | lol |
| digitok | :) |
| Mercury | Seriously. |
| digitok | i agree mate just trying to convince him lol |
| magic_user | ok perl is ractical extraction eh? I have a page of 208 internet2 universities, I want to end up with a nice list of the domains, harvard.edu (nextline) yale.edu etc. how? |
| integral | Try learning perl. perlbot tutorial./ perlbot tutorial. |
| perlbot | http://perlmonks.org/index.pl?node=Tutorials | http://perl.com/cs/user/query/q/6?id_topic=74 | http://learn.perl.org/ | http://books.perl.org/onlinebooks | http://perl-begin.berlios.de/tutorials/ | http://learn.perl.org/library/beginning_perl/ |
| magic_user | http://members.internet2.edu/university/universities.cfm I am currently readinf learning perl 4th ed but I am sadly inundated by all the rules, and not sure who to use them I got to ch2 about if then should one just plow along? I feel Im not absorbing anything |
| Mercury | my ($in_str, $out_str); $in_str =~ /^(?:<[^>]*)?([^<]+)(?{ $out_str .= $^N; }) (?:<[^>]+>([^<]+)(?{ $out_str .= $^N; }))*/; digitok: There may be typos, I've been up over 20 hours. |
| integral | Mercury++ |
| Mercury | digitok: That involves code snippits inside the regex in a manner the documentation warns not to use and which may not continue to function in future versions. |
| digitok | so it's likely to not work in php? |