My question is how can i make my regular expression to use a part of a string to find a new match even if this string is already choosed as a match, i don't know how to clarify it more than that, consider this example: I have a string which is
1+2-3*4/5
and i want to match every digit which is surrounded by two operator, my regular expression would be:
(([+]|[-]|[*]|[/])(\d)([+]|[-]|[*]|[/]))
which gives 2 matches, while i see 3 ('+2-','-3*' and '*4/'), this is because my pattern theoretically deletes a part of my string (the previous matche(s)) and use the rest of my string in the next searching. How do i enforce it to find ALL possible matches?
Any solution for my question/example would be very appreciated.