Useful regex rules to clean up your imported data

Numbers

TransformationRegex ruleReplacement
10,94 ➡ 10.94\,.
10.94 ➡ 10,94\.,
10,999,999 ➡ 10999999\d*

Currencies

TransformationRegex ruleReplacement
180 EUR ➡ 180\d+
$180 ➡ 180\d+
$10.94 ➡ 10,94\$(.*?)(\.|$)(.*)$1,$200
€10,94 ➡ 10.94\€(.*?)(,|$)(.*)$1.$200
10,94€ ➡ 10,94(.?),(.)\€$1,$200

Dates

TransformationRegex ruleReplacement
month/day/year -> day/month/year(\d*)\/(\d*)\/(\d*)$2/$1/$3
day/month/year -> month/day/year(\d*)\/(\d*)\/(\d*)$1/$2/$3
month/day/year -> year-month-day(\d*)\/(\d*)\/(\d*)$3-$1-$2
day/month/year -> year-month-day(\d*)\/(\d*)\/(\d*)$3-$2-$1

Try your regexes with Extends Class

Extends Class allows you to test your regular expression online.

Open the Regex Tester

Leave a Reply

Your email address will not be published. Required fields are marked *