They appear to be 19 long (20, if you count the '-' that they're prepended with). I don't think using [^\w] is the right approach though because it'll include all manner of things we don't necessarily want, most noticeably, a decimal point (or comma, I suppose, if you're a continental european). [\w] also includes digits, which in rare circumstances could lead to false positives. I'd rather be explicit. At present, I'm leaning toward this... (\s|,|^|"|')-?\d{1,16} ?(pp|PP|Pp|pP)(\s|,|$|"|') 16 places should be more than plenty and we'll cover the major delimiters. const populateCoinContents = ( input ) => { ppg = / ( \s | , | ^ | " | ')- ? \d {1,16} ? (pp | PP | Pp | pP)( \s | , | $ | " | ') / ; ppa = ppg . exec ( input ); gpg = / ( \s | , | ^ | " | ')- ? \d {1,16} ? (gp | GP | Gp | gP)( \s | , | $ | " | ') / ; gpa = gpg . exec ( input ); epg = / ( \s | , | ^ | " | ')- ? \d {1,16} ? (ep | EP | Ep | eP)( \s | , | $ | " | ') / ; epa = epg . exec ( input ); spg = / ( \s | , | ^ | " | ')- ? \d {1,16} ? (sp | SP | Sp | sP)( \s | , | $ | " | ') / ; spa = spg . exec ( input ); cpg = / ( \s | , | ^ | " | ')- ? \d {1,16} ? (cp | CP | Cp | cP)( \s | , | $ | " | ') / ; cpa = cpg . exec ( input ); }; As for -C "[amount][currency]" code, to be honest, I'd rather keep it in. At present, my code looks for it and will parse only from it if it finds it there, but otherwise, it'll just run across the entire subcommand. Granted, in most cases, it's not going to be overly useful, but player names are basically arbitrary strings and there's nothing to stop someone from naming themselves 99GP if they're a Warforged or something.