Feche1320 Posted March 12, 2012 Share Posted March 12, 2012 For example, I have this string: #33ff22Hello #8844aaworld#412548! And I want it without the colour codes. On lua I can use gsub, but on PHP how can I do it? Thanks Link to comment
0 Cadu12 Posted March 12, 2012 Share Posted March 12, 2012 preg_replace("/#[A-fa-f0-9]{1,6}/", "", "your #ff00ff string"); Link to comment
Question
Feche1320
For example, I have this string:
And I want it without the colour codes.
On lua I can use gsub, but on PHP how can I do it?
Thanks
Link to comment
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now