Re: copy ...
| From: | Erik Price | Date: | Mon, 17 Mar 2003 20:34:27 +0000 |
| Subject: | Re: copy ... | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140032@lists.php.net to get a copy of this message | ||
John Taylor-Johnston wrote:
Captn John, What the difference? I recognise the code from my attempts at Perl. What's the diff between ^ and *? Is there a doc I can read up more on? ;) Swabbie John "Cpt John W. Holmes" wrote:The first one says "eat TI then any number of characters until you get to the last ¶ in the target string, then eat that one too and stop there". The second one says "eat TI and then any number of characters that isn't a ¶, then when you finally get to one, eat it too but stop there". As for your doc, the definitive guide is <http://www.oreilly.com/catalog/regex2>. No, it's not a free web page somewhere, but it /will/ make you a master of regexes, something you can carry across all languages (except Perl6 :). I count it as possibly the most useful book I've ever read. ErikWhat about eregi("TI(.*)¶",$line,$m) might want to use eregi("TI([^¶]*)¶",$line,$m)