Alright, I\'ve read the tutorials and scrambled my head too much to be able to see clearly now.
I\'m trying to capture parameters and their type info from a function
It's been a while since this question was active, but I think I finally found an answer.
I think I was looking for the same situation as you, but for use with PHP, and there is an answer in another post I found that works really well, using the \K and \G commands from PCRE. See Alan Moore's answer here: PHP Regular Expression - Repeating Match of a Group
My issue was trying to pull out all the cell values in a table, where each row contained a 6 digit number, 20x a 1 or 2 digit number, and an unrelated 1 or 2 digit number. The solution was:
\s+(\d{6})<\/td>|\G<\/td>[^<>]*+ \K\d{1,6}| (\d{1,2})<\/td>
Very nice solution if I do say so myself!
- 热议问题