Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex containing ) or ] #38

Open
pomber opened this issue Mar 30, 2024 · 1 comment
Open

Regex containing ) or ] #38

pomber opened this issue Mar 30, 2024 · 1 comment

Comments

@pomber
Copy link
Contributor

pomber commented Mar 30, 2024

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="([^"]

@tomByrer
Copy link

tomByrer commented Apr 7, 2024

Tried escaping those characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants