-3

Good day! I have the following pattern:

/(?=test)(?=.*la).{8}/

to match this:

testlaoo

And it is working correctly. But I can't understand why do I have to use .* here

V. Terte
  • 7
  • 2

1 Answers1

0

You know, there are that little stupid questions without which you can't go ahead. It was one of them. So, you need .* before la to be able to match la anywhere not just at start.

V. Terte
  • 7
  • 2