You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like below, when I made a rule as fox[*], it needs a whitespace to parse the part with [*]. I understood square bracket as or, and round bracket as and. The round backets seems to work correctly, but square brackets seems to work differently with or. Was it intended to work like this?
rule: fox[*]
-> fox (O)
-> foxs (X)
-> foxes (X)
-> fox fox (O)
rule: fox[s|es]
-> fox (O)
-> foxs (X)
-> foxes (X)
-> fox s (O)
-> fox es (O)
-> fox fox (X)
rule: fox(*)
-> fox (X)
-> foxs (O)
-> foxes (O)
-> fox fox (O)
rule: fox(s|es)
-> fox (X)
-> foxs (O)
-> foxes (O)
-> fox fox (X)
The text was updated successfully, but these errors were encountered:
Optionals are meant to have spaces around them. They're for "optional words", not "or".
The regular expression the optionals turn into makes use of the \b word-boundary metacharacter, which matches on characters that aren't "word characters" (numbers or letters), so if the optional is directly touching a word, no word boundary is detected and it doesn't match properly.
You could use an array for common suffixes. With ! array s = s es, the trigger syntax @s would get expanded into the non-capturing regular expression (?:s|es), so it should work fine directly touching other words in your trigger, like
+ fox@s
# the regexp would become:
/^fox(?:s|es)$/
Like below, when I made a rule as
fox[*]
, it needs a whitespace to parse the part with [*]. I understood square bracket asor
, and round bracket asand
. The round backets seems to work correctly, but square brackets seems to work differently withor
. Was it intended to work like this?The text was updated successfully, but these errors were encountered: