Replies: 5 comments 2 replies
-
Maybe I should allow that, so that people can add modifiers. For example:
|
Beta Was this translation helpful? Give feedback.
-
Maybe add "or a dollar sign", so that people can add anchors? Or maybe anchors are only available on quoted strings. |
Beta Was this translation helpful? Give feedback.
-
As of b8f346c, the following are implemented:
|
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
Modifiers: Do I want to require the opening token to also close it:
I think I do want it -- it just looks lopsided without it. I considered:
Another option:
I think I like that one best. Here's what it could look like for regexes:
or small variant:
I think that may be the winner so far. For regexes, I should make it clear that the end-delimiter takes precedence over any special chars. For example:
This does not compile. The first Maybe I should prohibit
That's the string |
Beta Was this translation helpful? Give feedback.
-
My current thoughts:
|
|
. In links or images, it's]
for the display portion and)
for the URL portion."
(maybe'
, too?), and support standard escapes as well as a tbd unicode escape sequences. The quote char can be escaped.{"<custom>"}
where<custom>
is any string that does not contain a"
or a\
. The string then ends with that<custom>
. Standard escapes are supported; you cannot escape the custom ender. For example:{"%%"}my cool string which can have "quotes".%%
, but you can't do{"%%"}my cool \%% string
. Just use a different ender! The custom string may not be empty.^
and$
as anchors{/<custom>/}
, where<custom>
can't include/
or\
. This is particularly useful for URL regexes:{/%%/}^https://example.com/%%
.*
are both equivalent to "any"Example:
https://example.com/.*
(string are always substring search, but this example has a^
anchor)my "quote"
and a URL tohttp://my-regex.co
orhttp://my-regex.com
. As with strings, regexes are always substring but support anchors.Beta Was this translation helpful? Give feedback.
All reactions