in reply to Re^2: The nth occurrence of a characterin thread The nth occurrence of a character
This is certainly cheaper. If capturing can be avoided and this code is important for speed, choose the non-capturing version.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊