help with regular expressions
Posted: Thu Oct 28, 2004 3:59 pm
I have read the php manual and some other websites, but I’m still not getting it very well, so I'm asking if anyone first knows of a good website that will explain it in simple terms and with lots of examples (since I learn by examples).
And second if anyone can give me a sample of how to do a preg_match () for getting all the text between two words in a document.
So the idea is something like this:
thanks
And second if anyone can give me a sample of how to do a preg_match () for getting all the text between two words in a document.
So the idea is something like this:
Code: Select all
<?php
preg_match("/^(initialword) to (endword)$/", $file, $matches);
?>