REGEX issue
-
Hi everybody.
I’m trying to build a custom main menu, and I need to use a Regex, like this:
$main_menu = wp_list_categories(‘title_li=&orderby=id&hide_empty=0&echo=0&depth=1’);
preg_match_all(‘@<li class=”(?<c>.*?)”>.*?)”>(?<t>.*?)/\n@’, $main_menu, $cats);On my local server it runs succesfully, but online it returns this error:
Compilation failed: unrecognized character after (?< at offset 14Somebody can help me?
- The topic ‘REGEX issue’ is closed to new replies.