You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Isso é exatamente porque `regexp.lastIndex` é diferente de zero no segundo teste.
342
342
343
-
Para contornar isso, podemos definir `regexp.lastIndex = 0` antes de cada busca. Ou, em vez de chamar métodos no regexp, usar métodos de string `str.match/search/...`, eles não usam `lastIndex`.
343
+
Para contornar isso, podemos definir `regexp.lastIndex = 0` antes de cada busca. Ou, em vez de chamar métodos com regexp, usar métodos com string `str.match/search/...`, eles não usam `lastIndex`.
0 commit comments