Forum Moderators: coopster
What I'm actually trying to do is remove everthing in a page of html from <html> to the first <table
I know this can be done in PHP but this is just the start of the replacement I need to create so I'd like to do it in regex as its easier to build on.
in terms of your example:
$string = "dkjsdglkrfBngABCjdjfgd";
$match_length = preg_match("/glk[^ABC]*/", $string, $matches);
var_dump($matches);
exit();
should return 'glkrfBng' but it actually returns 'glkrf' because it stops on the first B not the whole ABC
Cheers