I need help letting you strip slashes in a pattern that looks for a URL path. I am trying to check if the path contains any numbers in the path after /orders/ as follows:
$str = '/admin/store/orders/20284?width...'; if ( preg_match ( '/orders/([0-9]+)/', $str, $matches ) ) { print_r($matches); }
However, I cannot escape the slash. Can anyone help? Thanks.
source share