I don't fully understand what you are doing, just a hint:
The position will not be altered if you try an "impossible" match within a look-ahead or look-behind.
So you maybe wanna try something like (?=(?<name> ... ))?
HTH!
Cheers Rolf
In reply to Re: reset named capture buffer within regex
by LanX
in thread reset named capture buffer within regex
by mhgoeschl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |