iShaun Posted September 5, 2008 Share Posted September 5, 2008 Ok, i have a preg_match_all function i need help with: heres the situation. I have some things that look like this { NAME } and some that look like this { $var }. Heres the PREG: preg_match_all('/\{\s*([^\}\s]*)\s*\}/',$this->act_structure,$matches); All i want it to do is find the { NAME } ones, not the { $var } ones. Right now its finding both. Help? -iShaun Link to comment https://forums.phpfreaks.com/topic/122813-solved-real-quick-question/ Share on other sites More sharing options...
rarebit Posted September 5, 2008 Share Posted September 5, 2008 preg_match_all('/\{\s*[A-Z]*\s*\}/',$this->act_structure,$matches); might work, depends upon how specific and exactly you want to allow... Link to comment https://forums.phpfreaks.com/topic/122813-solved-real-quick-question/#findComment-634215 Share on other sites More sharing options...
iShaun Posted September 5, 2008 Author Share Posted September 5, 2008 Nvm, fixed, thanks. Link to comment https://forums.phpfreaks.com/topic/122813-solved-real-quick-question/#findComment-634223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.