regex - Find text between string -
how extract text using perl string this:
get text 1 ... --------------------------------------------------------------------------------------------- text 2 ... --------------------------------------------------------------------------------------------- text 3 --------------------------------------------------------------------------------------------- the result should this:
%texts = ( 'text1' => 'get text 1 ...', 'text2' => 'get text 2 ...', 'text3' => 'get text 3 ...' ) something php preg_match_all.
many thanks
if preg_macth_all looks preg_match_all('/(foo)/', $text, $matches), perl equivalent @matches = $text=~/(foo)/g.
Comments
Post a Comment