Please use *Yr1::Med2::CAS4::F4: Renal::BRS (zanki)::HY as input. Works in Anki Desktop
*Hello (zanki)Note: Hello (zanki) and *Hello both work fine
Latest alpha
Cause:
The wildcard in the deck name triggers a regex search, and the brackets then fail the regex
Hello. What is the meaning of "use *Yr1::Med2::CAS4::F4: Renal::BRS (zanki)::HY as input"? Could you give some tips to understand this? Thanks a lot.
Hello. What is the meaning of "use *Yr1::Med2::CAS4::F4: Renal::BRS (zanki)::HY as input"? Could you give some tips to understand this? Thanks a lot.
Use *Yr1::Med2::CAS4::F4: Renal::BRS (zanki)::HY as a deck name if writing a regression test, as this was the input which caused problems originally.
Why execute _val = val.replace("_ * _", "_ .* _");_ when searching input contains _*_ ?
Why execute _val = val.replace("_ * _", "_ .* _");_ when searching input contains _*_ ?
Because we assume that if a user types in a star, it means "match anything".
In regex terms, the star is the Kleene Star operator, which needs to be applied to something .* represents "match anything".
Ideally, the fix for this problem would be to do a Decks.byName and return the deck if we have an exact match, then perform the regex search if a star is contained in the input.
Actually, I find that problem in card browser. When the deck name contains wildcard and brackets, the cards in this deck will not display in the card browser. When the context contains wildcard and brackets which is as the input of card searching, the result of cards don't display too. Do you think these could be two issues?
What's more, does the deck browser exist in ankiDroid?
Apologies, typo on my description. Fixed. This is the Card Browser.
Just a note: I'm curious how AnkiDesktop handles this. Is this just us? Might be they restrict those from deck names somehow (then we should also restrict) or that they have the same bug (then they'd love to know I'm sure)
Just a note: I'm curious how AnkiDesktop handles this. Is this just us? Might be they restrict those from deck names somehow (then we should also restrict) or that they have the same bug (then they'd love to know I'm sure)
Works in Anki Desktop (mentioned in the OP, first paragraph). Haven't had the time to look into how it's implemented.
Aw dang - I scanned to see but missed that it was already stated. Sorry
Hello 馃憢, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like _still searching for solutions_ and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Ideally, the fix for this problem would be to do a
Decks.byNameand return the deck if we have an exact match, then perform the regex search if a star is contained in the input.
Hi, I would like to try and solve this issue
@anadi198 with our blessing! Good luck and feel free to ask here if you have questions
@mikehardy I just realised there's a PR for this, so should I consider that as closed for good?
@anadi198 the PR was closed for simple lack of response, it may be correct. Best course of action is to pull the branch from the PR to see where it is, test it, and if it looks good submit a new PR with it
Ok, I will do that.
@mikehardy I tried the code in that PR and it seems to have fixed the issue(for Hello (zanki)). I'll open the PR.
Thanks! It seems like a small thing, but the simple act of testing it etc takes time and no one else had it. Very much appreciated it!