https://bz.apache.org/bugzilla/show_bug.cgi?id=57448
--- Comment #4 from Ingmar Eveslage <[email protected]> --- (In reply to Helge from comment #3) > Example: Show 198. from 198.19.81.98 > <!--#if expr="v('REMOTE_ADDR') =~ /(\d+\.)\d+/ && $1 =~ /(\d\.)/" --> > <!--#set var="foo" value="$0" --> > Found <!--#echo var="foo" --> > <!--#endif --> > You *must* use Backreferences in same Expression! That's correct, in the same expression you can use $1 and backreference matches. BUT $0 references always the whole string and not the last matched string. in Helges example foo == "198.19.81.98" and not as expected "198." if you try use a nested if, you can backreference <!--#if expr="v('REMOTE_ADDR') =~ /(\d+\.)\d+/ && $1 =~ /(\d\.)/" --> <!--# if expr='$1 == "198."' --> Found 198. <--#endif --> <!--#endif --> it matches. this means backreferences are available in nested ap_expr, but not for any "<!--#set" var or "<!--#echo" operation. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
