Inspired by Ruby's StringScanner class. Tries to match with pattern at the current position. If there’s a match, the scanner advances the scan pointer and returns the matched string. Otherwise, the ...