firasdib / Regex101

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

[Rust]Escaping " #2035

Closed ItalyToast closed 1 year ago

ItalyToast commented 1 year ago

Bug Description

I cant use either " or \" to match with the rust flavor. " spits out an error: " This token is either not supported by the selected flavor or by regex101 and \" spits out: \" This token has no special meaning and has thus been rendered erroneous

It makes sense to not support a naked " but a escaped " should be supported.

Reproduction steps

Regex input: \"(\w*)\" Text input: name: "Hours_fmt",

Expected Outcome

Expected a match of: "Hours_fmt"

Browser

Version 111.0.5563.65 (64-bit)

OS

Windows 10 64-bit

firasdib commented 1 year ago

You will have to change delimiter in order to insert a literal quote in Rust.

ItalyToast commented 1 year ago

Never knew that was a thing, the more you know. 👍