HappyPeng2x / SumatoraDictionary

An offline Japanese dictionary for Android.
GNU General Public License v3.0
22 stars 1 forks source link

Search with placeholders #25

Open duck-rh opened 2 years ago

duck-rh commented 2 years ago

Quack,

I often find myself looking for words containing kanji I know but not necessarily at the beginning or end. Also being able to limit the search pattern length can be useful.

I don't think a regex is needed and simply allowing one character or multiple would be sufficient I think. For example using ??力 would give me 攻撃力, 防御力 etc and * could mean any number of characters.

IIUC the current search filter does a substring search, so it would be a matter of detecting the pattern-specific characters (?*) and adapting the filter accordingly.

Regards. \_o<