Search query not working with $
-
So in php, this code works for finding a specific url, while avoiding any instance where there’s children pages in the url, and replacing it:
$str = []; $str[0] = 'https://www.ascentfunding.com/college-loans/for-students/faqs/'; $str[1] = '"/college-loans/for-students/"'; $str[2] = '"https://www.ascentfunding.com/college-loans/for-students"'; $str[3] = 'https://www.ascentfunding.com/college-loans/for-students'; $str[4] = '"https://www.ascentfunding.com/college-loans/for-students/faqs/"'; for ($i=0; $i<=4; $i++) { $str[$i] = preg_replace('/["]*^(.*)\/college-loans\/for-students(["\/]*)$/', '\1/bright-futures\2', $str[$i]); echo "str after replace:", $str[$i], "\n"; }
But when I try to use the search regex plugin to search for:
‘/[“]*^(.*)\/college-loans\/for-students([“\/]*)$/’
I get no results. I know there are instances of /college-loans/for-students/ within href values – does this plugin not allow the ‘$’ ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Search query not working with $’ is closed to new replies.