Question
World Bank Group
IN
Last activity: 25 Jun 2024 8:11 EDT
RUTA Script to detect Currency
I have requirement to get Currency code from the given string using RUTA.
I am using this script to get Currency codes.
W{REGEXP("(?i)(USD|EUR|AUD)") -> MARK(EntityType)};
But If we get $,€,US Dollar, it is not detecting. Whenever we get US dollar or $ assign it to USD variable.
So my requirement is,
Input: US dollar
Output:USD
Input: €
Output:EUR
I am trying to use this script but this is not working.
DECLARE USD; W{REGEXP("(?i)(USD|EUR|AUD)") -> MARK(EntityType)}}; | SPECIAL{REGEXP("\\$") -> USD};
Thanks in advance