Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Capture first and third digits after lookbehind with PHP regex

$
0
0

I have some strings that begin with ABC123 (simplified example for demonstration - actual strings may not be numbers or letters). From each string, I want to capture the character after ABC (1) and the character 2 digits after that (3), without capturing 2. I've managed to do the first part using a lookbehind, but haven't been able to figure out the rest.

Regex101 here with what I've got so far.


Viewing all articles
Browse latest Browse all 12141

Trending Articles