I need to parse some string containing this common text:
sources ID {number}/{number}/....
I'm trying with a regexp like this:
sources ID (\d+)(/(\d+)?/(\d+)?)?
here my tests: https://regex101.com/r/1PYe02/1
- string (1) is parsed correctly, but the second matching group has two elements
/1441/1443 - string (2) and (3) are parsed correctly
- string (4) matches only first elements
where I'm doing it wrong?