firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.26k stars 199 forks source link

Rust regex with literal quote (") not working #2033

Closed Ophirr33 closed 1 year ago

Ophirr33 commented 1 year ago

Bug Description

The following regex works when running within a rust program (playground):

r#""hello""#

But it fails in the regex101 app with the following error:

pattern '"' may not be contained in raw strings {"start":{"offset":0,"line":1,"column":0},"end":{"offset":1,"line":2,"column":1}}

Reproduction steps

  1. Navigate to https://regex101.com/
  2. Select Rust as the regex engine
  3. Select the raw delimiter mode #
  4. Paste in the regex "hello"

Expected Outcome

No error is given and text such as "hello" is an english greeting reports a match.

Browser

Firefox 111.0.1

OS

Pop!_OS 22.04 LTS

tgross35 commented 1 year ago

(to maintainers) I think this would be from sending just the raw unescaping, rather than the rawhash1: https://github.com/firasdib/Regex101/issues/2034#issuecomment-1496614510

firasdib commented 1 year ago

This will be resolved in the next release.