Hello,
I've been trying to find a way using regex to replace all special characters and spaces in a string but leaving the asterisk there.
Example:
(8.88)***1 234--
result should be:
888***1234
I've been looking on the web (still am) and also trying myself but I just can't find it, what I have removes the asterisk too, which I don't want. Here's what i have (by the way this is being coded in C#)
text = Regex.Replace(t ext, @"[()-. ]", string.Empty);
Maybe it's something really simple, don't get mad at me regex it's really confusing to me, and like I said I've been trying to find the answer but without any success so far.
Thanks.
I've been trying to find a way using regex to replace all special characters and spaces in a string but leaving the asterisk there.
Example:
(8.88)***1 234--
result should be:
888***1234
I've been looking on the web (still am) and also trying myself but I just can't find it, what I have removes the asterisk too, which I don't want. Here's what i have (by the way this is being coded in C#)
text = Regex.Replace(t ext, @"[()-. ]", string.Empty);
Maybe it's something really simple, don't get mad at me regex it's really confusing to me, and like I said I've been trying to find the answer but without any success so far.
Thanks.
Comment