regular expression capture nth match

for nth match use this pattern (?:.*?\$[0-9.]+){XX}.*?(\$[0-9.]+)
where XX = n-1

Example for 3rd match

Leave a Comment