Learn R Programming

doseminer (version 0.1.2)

regex_numbers: Regular expression to match numbers in English

Description

A regex pattern to identify natural language English number phrases, such as "one hundred and fifty" or "thirty-seven". Used internally by replace_numbers to identify substrings to replace with their decimal representation.

Usage

regex_numbers

Arguments

Format

An object of class character of length 1.

Details

This is a PCRE (Perl type) regular expression, so it must be used with perl = TRUE in base R regex functions. The packages stringr and stringi are based on the alternative ICU regular expression engine, so they cannot use this pattern.