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

"No delimiters" mode #1980

Open
AngryLoki opened this issue Feb 2, 2023 · 6 comments
Open

"No delimiters" mode #1980

AngryLoki opened this issue Feb 2, 2023 · 6 comments

Comments

@AngryLoki
Copy link

AngryLoki commented Feb 2, 2023

Feature

Right now there is a following complaint in Regex101:
image

However common cases for regexps are:

For such cases there is a suggestion to introduce a new URL flag &delimiter=none and support "No delimiters" mode in UI.

@OnlineCop
Copy link
Collaborator

Do you see that delimiter on the left side there, with that /?

image

In regex flavors that support different delimiters, you should be able to click that (next to the vertical triple-dot bar) to change delimiters from / to one of several other options.

@sunkin351
Copy link

Do you see that delimiter on the left side there, with that /?

image

In regex flavors that support different delimiters, you should be able to click that (next to the vertical triple-dot bar) to change delimiters from / to one of several other options.

This is not available for the .NET regex, which I am attempting to use. Furthermore, I can't have the " character in my regex at all, due to the following errors:

" An unescaped delimiter must be escaped; in most languages with a backslash (\)

\" This token has no special meaning and has thus been rendered erroneous

Damned if I do escape it, damned if I don't.

@OnlineCop
Copy link
Collaborator

When you switch to the .NET flavor, its delimiter is " so to match a literal double quote, write it 2x: ""

""(?>[^\\""]+|[\\].)*""

@sunkin351
Copy link

I see, thanks for that clarification.

@AngryLoki
Copy link
Author

AngryLoki commented Mar 15, 2023

@OnlineCop , sorry if my explanation was not clear.

I definitely know about "Change delimiter" dropdown. However, it requires to select some value. Below is a correct regular expression for PCRE/JS/many other regex engines:

[/~@;%`#]

It will work in VSCode, Pycharm, WebStorm, Notepad++, basically any software that supports regular expressions. It will work in any language if you read this expression from text file or database. However it won't work in Regex101 in any current mode.

@ThiefMaster
Copy link

I'd also like to see "no delimiter" mode. When the regex is stored e.g. in a database you do not have to worry about delimiters (at least in Python, YMMV if you have to deal with PHP 🙈).

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

No branches or pull requests

4 participants