Search using regular expressions

Asked by jonas nissen

Can you give an example on how to use regular expressions for filtering / searching? I have used regular expressions before, but i cannot quite get it to work. I see a message "This is an invalid regular expression ...".

Just a simple example to clearify if there is some special way to use it. Thanks :-)

Question information

Language:
English Edit question
Status:
Answered
For:
Task Coach Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Laheurte (fraca7) said :
#1

For the full story check out http://docs.python.org/3/library/re.html#regular-expression-syntax

Short version: some characters (., *, ?, +, some others) have special meaning. For instance a character followed by a "*" means any number of occurences of this character so a* matches "", "a", "aa", "aaa", etc. "+" means at least one occurence; "?" means 0 or 1 occurence, so those three must follow another character. "." is a wildcard meaning any character.

Can you help with this problem?

Provide an answer of your own, or ask jonas nissen for more information if necessary.

To post a message you must log in.