Meridianmeridian

Currency Amount (Multi-Character Symbol)

finance.currency.amount_multisym

Currency amounts with multi-character symbols: R$ (Brazilian Real), HK$ (Hong Kong Dollar), kr (Nordic Krone), Kč (Czech Koruna), zł (Polish Zloty). Separator conventions follow local standard.

Domain
finance
Category
currency
Casts to
VARCHAR
Scope
Universal

Try it

CLI
$ finetype infer -i "R$ 1.234,56"
→ finance.currency.amount_multisym

DuckDB

Detect
SELECT finetype('R$ 1.234,56');
-- → 'finance.currency.amount_multisym'
Cast expression
CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '^[A-Za-z$₹€£¥₩₿\p{Sc}\s]+', ''), '[.,](?=[0-9]{3})', '', 'g'), '[\s]', '', 'g'), ',', '.') AS DECIMAL(18,2))
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'finance.currency.amount_multisym';

Struct Expansion

Expression
symbol: REGEXP_EXTRACT({col}, '^([A-Za-z$₹€£¥₩₿\p{Sc}\s]+)')

JSON Schema

finetype schema finance.currency.amount_multisym
{
  "$id": "https://meridian.online/schemas/finance.currency.amount_multisym",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Currency amounts with multi-character symbols: R$ (Brazilian Real), HK$ (Hong Kong Dollar), kr (Nordic Krone), Kč (Czech Koruna), zł (Polish Zloty). Separator conventions follow local standard.",
  "examples": [
    "R$ 1.234,56",
    "HK$ 1,234.56",
    "kr 1 234,56",
    "Kč 1 234,56",
    "zł 1 234,56"
  ],
  "pattern": "^(R\\$|HK\\$|NT\\$|S\\$|A\\$|C\\$|NZ\\$|kr|Kč|zł|Ft|lei|Rp|Rs\\.?)\\s?-?[0-9]",
  "title": "Currency Amount (Multi-Character Symbol)",
  "type": "string",
  "x-finetype-broad-type": "VARCHAR",
  "x-finetype-transform": "CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '^[A-Za-z$₹€£¥₩₿\\p{Sc}\\s]+', ''), '[.,](?=[0-9]{3})', '', 'g'), '[\\s]', '', 'g'), ',', '.') AS DECIMAL(18,2))"
}

Examples

R$ 1.234,56HK$ 1,234.56kr 1 234,56Kč 1 234,56zł 1 234,56