I have a string which I store book pages. It's something like this:
///0///
Page1 Text
///1///
Page2 Text
///2///
Page3 Text
///3///
I want to extract page texts (Page1 Text, Page2 Text, Page3 Text). Here is the Regular Expression which is am using:
$format = "%///\d*///(.*)///\d*///%";
preg_replace_callback($format, "process_page", $text);
According to this page I can use other character than / in the start and end of the expression. So I used % to simplify my pattern, so I don't have to use escape character like this \/
It seems okay to me, but it return nothing. Can somebody please tell me where is the problem?
///?