everisk Posted April 16, 2009 Share Posted April 16, 2009 Hi, I'm trying to match data with 2 percent sign in front and after, in the middle it can be just capital letters or capital letters with numbers, i tried with /[(%){2}(A-Z0-9)(%){2}]/ and it doesn't work Any help would be greatly appreciated. Thank you ! Quote Link to comment Share on other sites More sharing options...
premiso Posted April 16, 2009 Share Posted April 16, 2009 <?php $string = "The quick %%BROWN%% Fox jumped %%BACK%% and %%2FRONT%%"; preg_match_all("~%%([A-Z0-9]+)%%~", $string, $result); var_dump($result); die(); ?> Quote Link to comment Share on other sites More sharing options...
everisk Posted April 17, 2009 Author Share Posted April 17, 2009 oh wow, thank you~! 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.