allow  in library, for unprefixed functions
optimize scanString to not run the regex more than once