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 ! Link to comment https://forums.phpfreaks.com/topic/154324-solved-regex-to-match-abc123/ 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(); ?> Link to comment https://forums.phpfreaks.com/topic/154324-solved-regex-to-match-abc123/#findComment-811529 Share on other sites More sharing options...
everisk Posted April 17, 2009 Author Share Posted April 17, 2009 oh wow, thank you~! Link to comment https://forums.phpfreaks.com/topic/154324-solved-regex-to-match-abc123/#findComment-812069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.