lighter icon indicating copy to clipboard operation
lighter copied to clipboard

Regex containing `)` or `]`

Open pomber opened this issue 1 year ago • 1 comments

This fails

```jsx
// !Fold[/className="([^"]+)"/g]
function Foo() {
  return (
    <div className="bg-red-200 opacity-50">
      <span className="border">hey</span>
    </div>
  )
}
```

with: Error: Invalid RegExp string: [/className="([^"]

pomber avatar Mar 30 '24 11:03 pomber

Tried escaping those characters?

tomByrer avatar Apr 07 '24 17:04 tomByrer