Home » Web development » Php » how to extract number only for php variable

Here is code to extract number only for php variable

<?php $str = get_comment_author_url();
      $str1 = preg_match('/d+/', $str23);
      echo $str1;

Array ( [0] => Php )