auto-group-tabs icon indicating copy to clipboard operation
auto-group-tabs copied to clipboard

Allow user to use real Regex

Open hieudmg opened this issue 10 months ago • 0 comments

It would be nice if users can specify a whole Regex for the match pattern.

I'm a web developer and I my local version of live sites url looks like this: http://local.<live-host>, and the pattern local.* does not work.

I tried editing the extension code:

File: /src/util/matcher-regex.ts, add these lines from line 13:

  try {
    const m = matcher.match(/^([/~@;%#'])(.*?)\1([gimsuy]*)$/);
    if (m) {
      return new RegExp(m[2], m[3]);
    }
  } catch (e) {
  }

Then I can put this in the input field: /^.*://local\..*$/ and it works.

hieudmg avatar Oct 14 '23 03:10 hieudmg