1

I want to fetch date from these html tags via regex preg_match

<span>User Signup Date: </span><span class="normal">Aug 24, 2015</span>

I just want to fetch only date Aug 24, 2015, every HTML page contain different dates. but all HTML pages contain same

<span>User Signup Date: </span><span class="normal"> 

HTML tag before date.

Please tell me what regex formula i have to use ?

 Note: HTML page contain many other <span class="normal"> HTML tags.
 So you must have to fetch date from this unique HTML tag 
 which contain <span>User Signup Date: </span> 
 BEFORE <span class="normal">

Your help will be appreciated!

1 Answer 1

1

Try this:

<span>User Signup Date: <\/span>.*(?:<span class="date">)([^\<]+)

https://regex101.com/r/iG6fL8/2

Hope this helps.

1
  • i update question so Please read question again and update your answer here thanks
    – smallbee
    Commented Feb 28, 2016 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.