I have the following regex:
^(?=.{8}$).+
The way I understand it, will take 8 characters of any type, followed by 1 or more characters. I feel like I donβt understand how Positive Lookahead works. Because both sections of Regex are looking. Does any character series match?
My question is, how does a positive lookahead affect this regular expression and what is an example of a matching string?
The following did not match if presented in the following regular expression tool :
- 123456781
- (12345678) 1
- (12345678)
- (ABCDEFGH) a
- (ABCDEFGH)
- Abc
- 123
EDIT: The first two data records were deleted, as I obviously did not use the regular expression tool correctly, since they now only correspond to 8 characters.
source share