To search for and match patterns in text and other data, regular expressions are an indispensable tool for the data scientist. Julia adheres to the Perl syntax of regular expressions. For a complete reference, refer to http://www.regular-expressions.info/reference.html. Regular expressions are represented in Julia as a double (or triple) quoted string preceded by r, such as r"..." (optionally, followed by one or more of the i, s, m, or x flags), and they are of type Regex. The regexp.jl script shows some examples.
In the first example, we will match the email addresses (#> shows the result):
email_pattern = r".+@.+" input = "firstname.lastname@example.org" println(occursin(email_pattern, input)) #> true
The regular expression pattern ...