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! Quote Link to comment 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]; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.