I am trying to find everything in a paragraph that is not abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 and not space / /gi
/[^a-zA-Z0-9]|[^ ]/g
You can use this for am trying to find everything in a paragraph that is not abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 and not space / /gi
replaceAll("[^A-Za-z0-9\\s]", "")
You could also try with:
/[^a-zA-Z0-9\s]/gi
If you only want to exclude spaces use:
[^ ]*
Test the regex here if you want.
try ^[\d\w]*$
or ^[\w]*$
as reg' Expression means from ^(start)
to $(end)
match 0-9a-zA-Z
only
for c++ ansistring="^[\\d\\w]*$";