Giter Club home page Giter Club logo

anki21-addon-regex-search's Introduction

Regex Search for Anki 2.1

This is an add-on for Anki version 2.1 that allows you to use regular expression pattern matching to search for cards in the browser and the filtered deck creation dialog. It also provides a feature that allows you to use wildcard pattern matching to specify a field name.

Regex literal

You can use a regex literal as a search term, which consists of a regex pattern enclosed between slashes, as follows:

  • /ab+c/
  • text:/Hello\b.*world/

A regex search is case-sensitive by default. If you want to perform a regex search in a case-insensitive manner, add i flag to the end of a regex literal, as follows:

  • /ab+c/i

Wildcard matching on field names

Optional (Enabled by default)

As an optional feature, you can use wildcard pattern matching to specify a field name. A character * matches zero or more of any character. Field names are handled in a case-insensitive manner.

  • *text*:abc
    • Find notes with a field whose name is Text, text 1, English Text, etc., and which contains a string abc.

This feature can also be used in combination with regex search.

  • *info*:/hello\b.*world/i

This feature can be disabled or the wildcard character can be changed via add-on's config dialog.

  • Go to Tools > Add-ons > Select this add-on > Config

Note

Anki's manual says:

If you want to search for something including a space or parenthesis, enclose it in quotes.

  • "/apple(?!\s*pie)/"
  • "* foo *:abc"

Keep this point in mind, since parentheses are often used in regular expression patterns.

Known issues

This add-on conflicts with Word search and wildcard field name (2.1) add-on.

Installation

https://ankiweb.net/shared/info/2044559350

anki21-addon-regex-search's People

Contributors

hikaru-y avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

fitzlm

anki21-addon-regex-search's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.