Allow ranges anywhere in the search string

Small change to allow ranges to be specified anywhere in the string, rather than just the start.