Flexible Mining of Patterns in Sequential Data