I am trying to match regular expression
/getData/?p<1d>[^/]
in /getData/1
using preg_match
but this is not working with php 5.6.10 while it is working fine with php 5.3.8.
Please tell how do i solve this problem?
Thanks in advance.
You forget to add brackets around the named capturing group id
and also you need to remove p
which exists before <id>
/getData/(?<id>[^/])