Improve CharCountBased performance

The extra / avoids ([^/]+) placeholders trying to eat up the tab
characters, thus avoiding unnecessary backtracking.