I have a string, something like this: rgb (255, 0, 0)
. And I want to remove every character inside it except numbers and the ,
(comma) character.
I have two questions based on this:
How to do that with Regex? (I found this answer, but I don't know how to include the
,
(comma) sign into it...)Is Regex the best method for this purpose? Or there is some other (better) methods?
(Best = having best performance)