Activity Detection Using Regular Expressions