drbigfresh Posted April 23, 2007 Share Posted April 23, 2007 What would I do to match the word after ': @' (excluding the quotes and there is a space between : and @.) Such as: : @AWordWithNoSpace and I would want to pull out: 'AWordWithNoSpace' Thanks! Link to comment https://forums.phpfreaks.com/topic/48216-seems-simple-but-cant-extract-the-word/ Share on other sites More sharing options...
Guest prozente Posted April 23, 2007 Share Posted April 23, 2007 <?php $data = ': @AWordWithNoSpace'; preg_match('/: @([a-zA-Z]+)/', $data, $matches); echo $matches[1]; ?> Link to comment https://forums.phpfreaks.com/topic/48216-seems-simple-but-cant-extract-the-word/#findComment-235727 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.