PHP preg_match_all()

From: Date: Fri, 21 Mar 2003 16:13:37 +0000
Subject: PHP preg_match_all()
Groups: php.general 
Request: Send a blank email to php-general+get-140604@lists.php.net to get a copy of this message
I am having to edit a php script that one of our previous employees had written and I am having a problem understanding the preg_match_all function. preg_match_all("|<img src=/news/(.*)>|U", $read, $result2); here is what I THINK I know: The | at the beginning signifies the start of the text to search for, then the actual text to search <img src=/news/(.*)> - the (.*) means to include everything after the / in the search as well....what I dont quite understand is what the |U is actually doing....then it tells the function what variable to $read and what new variable to store in: $result2.... can anyone fill me in if my logic is not correct and what exactly the |U is doing in this function? Jay Fitzgerald, Design Director - CPW-A, CPWDS-A, CPWDV-A, CECM-A, CWCSB-A Bayou Internet - http://www.bayou.com Toll Free: 888.30.BAYOU (22968) Vox: 318.338.2034 / Fax: 318.338.2506 E-Mail: jayfitz@bayou.com ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf

« previous php.general (#140604) next »