CosmosRP Posted March 13, 2010 Share Posted March 13, 2010 I currently have a regex: (\074color\s*=\042[0-9A-Za-z]+?\042\s*\076.*<\057color>) .. that matches " <color="hexcode/colorname">anything[wildcard]</color> " However, I want to change this so that it matches: " lt;color="HEXCODE/COLORNAME">ANYTHING[WILDCARD]</color> I imagine its just a simple matter of editing the original regex, but i'm really inexperienced when it comes to this stuff. Can someone help? =O Quote Link to comment Share on other sites More sharing options...
cags Posted March 13, 2010 Share Posted March 13, 2010 The only difference I can spot is the capitalization, is that what you were getting at? If that is the case then you should only need to add a modifier. I suggest you post the exact line of code you are using rather than just the regex as I'm guessing your using ereg, which is now deprecated. Quote Link to comment Share on other sites More sharing options...
sasa Posted March 17, 2010 Share Posted March 17, 2010 (<color\s*="[0-9A-Za-z]+?"\s*>.*</color>) or use htmlspecialchars_decode() function before regex 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.