You should add the `$` to the end of the pattern. For now it translates `1Mfoo` to `1024 * 1024`, but the right result is `1`