Answers for "regex Remove non alphanumeric character python"

6

python regex replace all non alphanumeric characters

import re

s = re.sub('[^0-9a-zA-Z]+', '*', s)
Posted by: Guest on March-08-2021
0

How do I remove all non alphanumeric characters from a string?

Regex rgx = new Regex("[^a-zA-Z0-9 -]");
str = rgx.Replace(str, "");
Posted by: Guest on March-25-2020

Code answers related to "regex Remove non alphanumeric character python"

Python Answers by Framework

Browse Popular Code Answers by Language