↑ Return to O80 Trello Butler

O81 Syntax

George Morgan
My articles
Follow on:

Page no: O81



We are using regex:/…../i

… stands for all the keywords separated by |

Regex Background

Not needed

Example: Authors? [zero or 1 s] author, authors and with /i also Author, Authors

Example: books? [zero or 1 s] this matches book and books and with /i also Book, Books

Required Syntax for Plural


Simple matching logic, no special characters needed

“cron” matches cards that contain cron

“ron ” matches cards that contain “ron ”





Previous Topic

Next Topic

Book Contents

Book Index

Simple RegEx Tutorial

Regular Expression can be used in Content Filter conditions.

Regular Expressions can be extremely complex but they are very flexible and powerful and can be used to perform comparisons that cannot be done using the other checks available.

There follows some very basic examples of regular expression usage. For a complete description please visit www.regular-expressions.info.

^’ and ‘$’

First of all, let’s take a look at two special symbols: ‘^’ and ‘$’. These symbols indicate the start and the end of a string, respectively:


matches any string that starts with “The”.

“of despair$”

matches a string that ends in with “of despair”.


a string that starts and ends with “abc” – effectively an exact match comparison.


a string that has the text “notice” in it.

You can see that if you don’t use either of these two characters, you’re saying that the pattern may occur anywhere inside the string — you’re not “hooking” it to any of the edges.

‘*’, ‘+’, and ‘?’

In addition, the symbols ‘*’, ‘+’, and ‘?’, denote the number of times a character or a sequence of characters may occur. What they mean is: “zero or more”, “one or more”, and “zero or one.” Here are some examples:


matches a string that has an a followed by zero or more b’s (“ac”, “abc”, “abbc”, etc.)


same, but there’s at least one b (“abc”, “abbc”, etc., but not “ac”)


there might be a single s (Plural) or not (“ac”, “abc” but not “abbc”).


a possible ‘a’ followed by one or more ‘b’s at the end of the string:

Matches any string ending with “ab”, “abb”, “abbb” etc. or “b”, “bb” etc. but not “aab”, “aabb” etc.

Braces { }

You can also use bounds, which appear inside braces and indicate ranges in the number of occurrences:


matches a string that has an a followed by exactly two b’s (“abb”)


there are at least two b’s (“abb”, “abbbb”, etc.)


from three to five b’s (“abbb”, “abbbb”, or “abbbbb”)

Note that you must always specify the first number of a range (i.e., “{0,2}”, not “{,2}”). Also, as you might have noticed, the symbols ‘*’, ‘+’, and ‘?’ have the same effect as using the bounds “{0,}”, “{1,}”, and “{0,1}”, respectively.

Now, to quantify a sequence of characters, put them inside parentheses:


matches a string that has an a followed by zero or more copies of the sequence “bc”


one through five copies of “bc.”

‘|’ OR operator

There’s also the ‘|’ symbol, which works as an OR operator:


matches a string that has either “hi” or “hello” in it


a string that has either “bef” or “cdef”


a string that has a sequence of alternating a’s and b’s ending in a c


A period (‘.’) stands for any single character:


matches a string that has an a followed by one character and a digit


a string with exactly 3 characters

Bracket expressions

specify which characters are allowed in a single position of a string:


matches a string that has either an a or a b (that’s the same as “a|b”)


a string that has lowercase letters ‘a’ through ‘d’ (that’s equal to “a|b|c|d” and even “[abcd]”)


a string that starts with a letter


a string that has a single digit before a percent sign

“,[a-zA-Z0- 9]$”

a string that ends in a comma followed by an alphanumeric character

You can also list which characters you DON’T want — just use a ‘^’ as the first symbol in a bracket expression (i.e., “%[^a- zA-Z]%” matches a string with a character that is not a letter between two percent signs).

In order to be taken literally, you must escape the characters “^.[$()|*+?{\” with a backslash (‘\’), as they have special meaning. On top of that, you must escape the backslash character itself in PHP3 strings, so, for instance, the regular expression “(\$|A)[0-9]+” would have the function call: ereg(“(\\$|A)[0-9]+”, $str) (what string does that validate?)

Just don’t forget that bracket expressions are an exception to that rule–inside them, all special characters, including the backslash (‘\’), lose their special powers (i.e., “[*\+?{}.]” matches exactly any of the characters inside the brackets). And, as the regex manual pages tell us: “To include a literal ‘]’ in the list, make it the first character (following a possible ‘^’). To include a literal ‘-‘, make it the first or last character, or the second endpoint of a range.”


Trello Operations



to be filled O81
Availability of actions



Card Actions

  • createcopymovearchive or unarchive a card,
  • movecopy or archive all cards in a list,
  • move or copy a random selection of cards from a list,
  • joinleavesubscribe to, or unsubscribe from a card,
  • add a labelstickerdue datechecklistchecklist itemmember, or comment to a card,
  • add a label to all the cards in a list,
  • rename a card,
  • set the description of a card,
  • remove a labelall labels, a stickerall stickers, the due date, a checklistall checklists, a memberall members, and/or the cover image from a card or all cards in a list or all archived cards,
  • check or uncheck an item in a checklist in a card,
  • reset a checklist or all checklists in a card,
  • convert all the (complete or incompletechecklist items in a card to cards in a list,
  • find a card in a list or a board,

List Actions

  • create or rename a list,
  • move a list to a position on the board (topbottom or a number), and/or to another board.
  • archive or unarchive a list,
  • randomly shuffle the cards in a list,

Board Actions

  • create a board,

Settings and Misc Actions

  • count the labels in a board,
  • count the cards in a list or all the lists in a board,
  • set the timezone for the board.
  • set silent on or off.
  • set no stickers.




See more for O8x Butler