I've been looking for a way to read numbers that have thousands separators in them:
StringCases[" 1142.123 ", Whitespace ~~ NumberString ~~ Whitespace, 1]
gives
{" 1142.123 "}
but
StringCases[" 1,142.123 ", Whitespace ~~ NumberString ~~ Whitespace, 1]
gives
{}
So ideally there's a Mathematica way of defining NumberString
to recognize commas in numbers. Or should I be looking into regexen at this point?