I am looking for a solution to clean an item in a database. I need to clean from a column all the values that have only letters, because in the same column there are valid values with alphanumeric and numeric characters. Here’s the current situation and expected one:
I was trying to fix it, using the “column expressions” node. I need to replace the values with only letters for a missing value.
The \b’s are for boundaries. If you do not disclose those than the Regex will also start to match some of the other records which includes a letter but does not only consist of letters, like the CE1019010.
I would recommend using an online Regex engine to play around with the Regex and you can see the resulting behavior “live”, like I have done above.
One example:
To allow spaces, you can just add it to the code between the brackets. So [A-Za-z] will
become [A-Za-z ]
I would go with rule engine’s “matches” and search for a digit. If one is included then return value else return nothing. And I agree with @bruno29a helpful advice.
br