in reply to Re^2: The nth occurrence of a character
in 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.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^3: The nth occurrence of a character