Where n=4 in my example.
I'm very new to Regex and have searched for 20 minutes now. There are some helpful websites out there that simplify things but I can't work out how to proceed with this.
I wish to extract every combination of 4 consecutive digits from this:
12345
to get:
1234 - possible with ^\d{4}/g - Starts at the beginning
2345 - possible with \d{4}$/g - Starts at the end
But I can't get both! The input could be any length.