I have a string of characters which has 0 or more occurrences of ABC = dddd
within it. The dddd
stands for an integer value, not necessarily four digits.
What I'd like to do is capture the integer values that occur within this pattern. I know how to perform matches with regexes but I'm new to capturing. It's not necessary to capture all the ABC integer values in one call—it's fine to loop over the string.
If this is too involved I'll just write a tiny parser, but I'd like to use regex if it's reasonably elegant. Expertise greatly appreciated.