title: Extract a dynamic substring from string
body: <hr>
  
  <p>i am working on a project, in this project i have a requirement of tag friends in comment like <a href="http://www.facebook.com" rel="nofollow">Facebook</a> did. 
  i done almost all things for tagging a friend but "notify to user" -> this task will blow my mind because when i am retrieving comment with tagged user it look like this:</p>
  
  <pre><code>&lt;a class="red" contenteditable="false" href="http://localhost:8080/review/index.php/user/wall/136"&gt;Rashid&amp;nbsp;Hussain&lt;/a&gt;
  </code></pre>
  
  <p>i have 2 questions,</p>
  
  <blockquote>
    <p>1) how can i differentiate that comment have tagged user or not. </p>
    
    <p>2) how can i retrieve user id from href in comment looks like this "136" after "user/wall/"</p>
  </blockquote>
  
  <p>========================================================================</p>
  
  <p>note: i dont know id length that id has 1 int, 2 int, 3 int or maybe 4 int </p>
  
  <p>I've tried this</p>
  
  <pre><code>strpos($comment, $findme);
  </code></pre>
  
  <p>but the point is i dont know the lenth of int.</p>
  
  <p>answer me please as fast as you can.</p>