Negative Lookahead for Regex -
what difference between:
^(?!.*baa)[abc]*$ and
^(?!baa)[abc]*$ what role of .*. know means character 0 or more times why second 1 capture strings cccaabaa should discarded?
the difference between them is:
^(?!.*baa)requiresbaanot anywhere in input^(?!baa)requiresbaanot @ the start of input
the .* allows between start ^ , baa.
Comments
Post a Comment