Skip to content

RegExp.$1 not get the right value #829

@Fndroid

Description

@Fndroid

When I tried to use RegExp by calling .test(), I got different results when the code was obfuscatied.

Here is the sample code to reproduce the issue: gist

Expected Behavior

The code above should log the host(127.0.0.1:54637) of the url to the console

Current Behavior

By running multiple times of npm run test, I got different results.
image

Steps to Reproduce

  1. clone the code from gist
  2. install deps npm install
  3. run npm run test

Your Environment

  • Obfuscator version used: 2.9.4
  • Node version used: v12.16.3

Stack trace

no error throw in this case.

Minimal working example that will help to reproduce issue

gist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions