Time:11-24
I have the following valid regex to match various excel cell/range patterns, of the form A1, A1:Z12, etc.
A1
A1:Z12
And a better approach would be to use ?1 to recurse to the first pattern:
?1
^([A-Z]{1,3}[0-9]{1,10})(:(?1))?$
Note however with this approach we do need the extraneous capturing group at the beginning for this technique to work.
Page link:https//www.codepudding.com/Mobile/202610.html