Regular expressions allow us to identify patterns of data by using generic search patterns. For example, searching for all possible phone numbers of the XXX-XXX-XXXX type appearing in a document can be easily accomplished by one regular expression. We're going to create a regular expression module that will run a set of default expressions or a user-supplied expression against the processed WAL data. The purpose of the default expressions will be to identify relevant forensic information such as URLs or Personally Identifiable Information (PII).
While this section is not a primer on regular expression by any means, we'll briefly touch on the basics so that we can understand its advantages and the regular expressions used in the code. In Python, we use the re module to run regular expressions against strings. First, we must compile the regular...