Source code

Revision control

Copy as Markdown

Other Tools

var result = "foobarbaz".replace(/foo(bar)?bar/, "$1");
assertEq(result, "baz");