In the following example text I am trying to write a regex to match token
, password
, … but not items
. I tried to use \'(<?items)(.*)\' => \[
without any success. What is the correct RegEx to do that?
[
'items' => [
'token' => [
'type' => 'hidden',
'ng-model' => 'token'
],
'password' => [
'readonly' => $token,
'type' => 'password',
],
'newPassword' => [
'type' => 'password'
],
'confirmPassword' => [
'type' => 'password'
]
]
]
Update
I wonder why .*(?!items)
, .*(?<!items)
, (?<=itmes).*
and (?!items).*
do not work functionally the same in this particular situation?