I'm trying to do a RegExReplace in PHP using preg_replace() however I can't seem to get the same result.
It essentially trims the end of off a varying breadcrumb result.
For instance in this example I'm trying to remove a line feed return and non word character.
Str = ( <a class="headerNavigation" href="http://localhost/index.php?cPath=21_24">Products</a> ยป <a class="headerNavigation" href="http://localhost/info.php?cPath=21_24&products_id=28"></a> </p> ) ; Testing Environment: echo RegExReplace( str, ">\K\r\W(?=\r.*?pr)" ) ; Works! ; AHk RegExReplace( str, ">\K`n\W(?=`n.*?pr)", "" ) ; Works! ; PHP echo preg_replace( '/>\K\r\W(?=\r.*?pr)/', '', $str ); Fails!I've tried several modifications including a non shorthand positive look-behind and different (*LF)(*CR)(*CRLF) combinations.
Anyone know how I can get this to work?
Thanks for any help as I know its not AHK related..