<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188407</bug_id>
          
          <creation_ts>2018-08-08 05:10:34 -0700</creation_ts>
          <short_desc>RegExp.exec returns wrong value with pattern &quot;(?!(a)b)|ab&quot;</short_desc>
          <delta_ts>2025-04-20 07:25:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Safari 11</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=210576</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>isol2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>iKonnyaku40</cc>
    
    <cc>msaboff</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1448732</commentid>
    <comment_count>0</comment_count>
    <who name="">isol2</who>
    <bug_when>2018-08-08 05:10:34 -0700</bug_when>
    <thetext>OS: Ubuntu 16.04 x64
jsc build version: 234689

Steps to reproduce:
t = new RegExp (&quot;(?!(a)b)|ab&quot;).exec(&quot;ab&quot;);
print(t[0] == &quot;ab&quot;);
print(t[1] == undefined);
print(t)

Actual results:
true
false
ab,a

Expected results:
true
true
ab,


V8, SpiderMonkey and Chakra works as expected.



cinfuzz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105412</commentid>
    <comment_count>1</comment_count>
    <who name="Keita Nonaka">iKonnyaku40</who>
    <bug_when>2025-03-23 06:53:39 -0700</bug_when>
    <thetext>I cannot reproduce it with the latest JSC (b2323ec6eaf613835bbaf8964d6e6d53b5310653). I think this is resolved already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2112060</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2025-04-20 07:25:33 -0700</bug_when>
    <thetext>Yup. It seems that this is already fixed in ToT.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>