regex - PHP string with special characters returns wrong answer -


i have these 2 lines in code:

$pattern = "/<p class=\"prev [first]*\"><a href=\"\/photography\/photo-of-the-day\/[^\/]+/"; echo $pattern; 

and output just:

/ 

i tried this:

$pattern = '/<p class="prev [first]*"><a href="\/photography\/photo-of-the-day\/[^\/]+/'; echo $pattern; 

but got same output. problem?

the problem was seeing output in browser , rendered browser , wasn't able see content. looking @ page source in browser way can see expected output.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -