December 28, 201015 yr I have various strings I need to extract from a bigger string. The string are all in the format - <a href="/drupal/test">testlink-#2<span class="image-replace"></span></a> <a href="/drupal/test">testlink-#5<span class="image-replace"></span></a> <a href="/drupal/test">testlink-#14<span class="image-replace"></span></a> As you can see the only change is the number after the #. Is anyone able to put together a regexp that will extract all strings in this format using preg_match_all()?
December 28, 201015 yr '%<a href="/drupal/test">testlink-#\d+<span class="image-replace"></span></a>%' that should do it
Create an account or sign in to comment