<?php
function getStrsBetween($s,$s1,$s2=false,$offset=0) {
/*====================================================================
Function to scan a string for items encapsulated within a pair of tags
getStrsBetween(string, tag1, <tag2>, <offset>
If no second tag is specified, then match between identical tags
Returns an array indexed with the encapsulated text, which is in turn
a sub-array, containing the position of each item.
Jesus fucking christ, how fucking stupid are people.
REGEXP MOTHERFUCKER, DO YOU USE IT?
Fuck, if you don't want to use regexp, do the next best thing -- USE THE FUCKING DOM. Sure, it isn't exactly lightweight, but it does what you want to do in a fraction of the code.
This is what's wrong with all these idiot programmers anymore. They think the best way to solve the solution is by hand. PROTIP -- other people are much fucking smarter than you are -- the people who write the fucking libraries aren't going to fuck up trivial shit.
Name:
Anonymous2007-09-26 14:06 ID:lXrckt3x
the people who write the fucking libraries aren't going to fuck up trivial shit.
This is PHP we're talking about.
Name:
Anonymous2007-09-26 18:40 ID:52fMGFpN
>>8
Wow, what a morans. I'd rather write ten pages of regex rather than one line of code.
Seriously though, anyone who's scared of PCRE fails hard; if he can't understand such a simple and useful tool, I shudder to think what he'll do to the project.
>>11
Lol. But PHP's preg_* is an interface to libpcre, a high quality Perl-Compatible library. It works great.