CAS Registry Number
Chemical Abstracts Service registry number. Unique numeric identifier for chemical substances. Format: 2-7 digits, hyphen, 2 digits, hyphen, 1 check digit. The check digit is the weighted sum of all preceding digits mod 10, where the rightmost digit before the check has weight 1, next has weight 2, etc.
CAS Registry Number
representation.scientific.cas_numberChemical Abstracts Service registry number. Unique numeric identifier for chemical substances. Format: 2-7 digits, hyphen, 2 digits, hyphen, 1 check digit. The check digit is the weighted sum of all preceding digits mod 10, where the rightmost digit before the check has weight 1, next has weight 2, etc.
Domain
representation
Category
scientific
Casts to
VARCHAR
Scope
Universal
Try it
CLI
$ finetype infer -i "7732-18-5"
→ representation.scientific.cas_numberDuckDB
Detect
SELECT finetype('7732-18-5');
-- → 'representation.scientific.cas_number'Cast expression
CAST({col} AS VARCHAR)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) = 'representation.scientific.cas_number';Struct Expansion
Expression
check_digit: REGEXP_EXTRACT({col}, '-(\d)$')
part1: REGEXP_EXTRACT({col}, '^(\d+)-')
part2: REGEXP_EXTRACT({col}, '-(\d{2})-')JSON Schema
finetype schema representation.scientific.cas_number
{
"$id": "https://meridian.online/schemas/representation.scientific.cas_number",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Chemical Abstracts Service registry number. Unique numeric identifier for chemical substances. Format: 2-7 digits, hyphen, 2 digits, hyphen, 1 check digit. The check digit is the weighted sum of all preceding digits mod 10, where the rightmost digit before the check has weight 1, next has weight 2, etc.",
"examples": [
"7732-18-5",
"64-17-5",
"50-78-2",
"7647-14-5",
"67-56-1",
"71-43-2"
],
"pattern": "^\\d{2,7}-\\d{2}-\\d$",
"title": "CAS Registry Number",
"type": "string",
"x-finetype-broad-type": "VARCHAR",
"x-finetype-transform": "CAST({col} AS VARCHAR)"
}Examples
7732-18-564-17-550-78-27647-14-567-56-171-43-2Aliases
cas_rncas_idchemical_id