1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 description: Stops match execution after first match failure
8 21.2.5.9 RegExp.prototype [ @@search ] ( string )
11 9. Let result be RegExpExec(rx, S).
13 21.2.5.2.2 Runtime Semantics: RegExpBuiltinExec ( R, S )
16 4. Let lastIndex be ToLength(Get(R,"lastIndex")).
18 8. Let sticky be ToBoolean(Get(R, "sticky")).
20 15. Repeat, while matchSucceeded is false
22 b. Let r be matcher(S, lastIndex).
23 c. If r is failure, then
24 i. If sticky is true, then
27 features: [Symbol.search]
30 assert.sameValue(/a/y[Symbol.search]('ba'), -1);