-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
wrong error message in case of using RegExpr with nested "[...]"in Advanced Search #4267
Comments
Thanks @CarpeDiemKopi -- its actually helpful if GitHub issues can be self-contained, and not require reading a thread elsewhere to understand what is being requested. The best way of reporting a problem is to say what you did, what happened, and what you expected to happen. So this one might have said:
I don't know what error message you were expecting, but this one is fairly typical in that it is necessarily written from the point of the view of the software as it tries to make sense of the input. Here, it is reading the regexp operator as having the operand It's hard to come up with better wording that still covers all of the situations in which the error can arise, but I'm open to suggestions. |
Thanks for the answer @Jermolene. Point taken. I should have put a summary of the thread here before. You write from the programmer's point of view. As a user I think that after the second bracket I am in the world of RegExp: [regexp:created[ and here you're entering the RegExp universum ]].
=> I don't expect any error messages! ( I expect the ability to escape brackets inside regular expressions to avoid this error message. |
I analyzed the problem in
See in my fork this commit: case regex: operator It looks like a lot more because I've added several console.log commands to be able to set breakpoints. |
Whilst I'm very keen on anything that makes JS regex easier to work with I think allowing [...] in the context of core TW filtering could be somewhat problemmatic. The issue is that the filter syntax "reserves" [...] for its own use. The PR would create an anomaly in docs. So, one one hand I'm in favour of it; on the other I think its adds yet more complexity to TW filter syntax that could be confusing?? |
It is true. TW uses those brackets internally. My question was, and remains this: IN the CONTEXT of TW is it okay in its existing syntax to utilise [...] INSIDE filters that use [...] to hold them? My concern is NOT function in regex. It is simply it may be CONFUSING breaking a general filter rule. I'm actually neutral about the outcome. |
Is there any (conceivable) use case at all that requires switching to WikiText within a RegEx? |
I have no idea what that means. |
@CarpeDiemKopi this Can you please specify what you want to achieve? |
with a fixed syntax error, the mentioned reqexp is interpreted as:
|
TW can't handle "backreferences" at the moment! |
If you can provide a valid regexp, it would be possible to check the problems. |
@pmario |
see Task: Filter all tiddlers created between 01.09.2019 and 15.09.2019. How/where to find information/documentation to get this task done?
The text was updated successfully, but these errors were encountered: