Regular expression with Spark sql
if you have data where you want to filter out all special characters along with numeric character from string then use spark sql regular expression function - regexp_replace
Example : -
Name
sbdgd&(&**,4343
ram7534- 5%7777
Select regexp_replace(name, '[^a-zA-z]', ' ') as name from table_name
Result:
Name
sbdgd
ram
Comments
Post a Comment