Skip to content
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

Support ranged word wildcard matching #3

Open
kirsle opened this issue Feb 4, 2015 · 0 comments
Open

Support ranged word wildcard matching #3

kirsle opened this issue Feb 4, 2015 · 0 comments

Comments

@kirsle
Copy link
Member

kirsle commented Feb 4, 2015

Support an extended syntax for wildcard characters in triggers to enable them to match ranged numbers of words, for example one could match "between 2 and 4 words" or one could be "no more than 3 words" and so on.

Syntax example:

// match 2 words (first and last name)
+ my name is *2
- Nice to meet you <formal>.

Types of ranged words to support:

  • * = match one or more words (current behavior; no change) -- regexp equivalent (.+?)
  • *5 = match exactly five words -- regexp <word>{5} where <word> is like (?:\b\w+\b[\s\r\n]*)
  • *~5 = match one to five words -- regexp <word>{1,5}
  • *2~5 = match two to five words -- regexp <word>{2,5}
  • *2~ = match at least two words -- regexp <word>{2,}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant