Julia has built-in regular expression handling—as would most modern programming languages. There is no need for using statements, since regular expressions are basic features of strings in Julia.
We could have a small script that validates whether a string is a valid phone number, for example:
ismatch(r"^\([0-9]{3}\)[0-9]{3}-[0-9]{4}$", "(781)244-1212") ismatch(r"^\([0-9]{3}\)[0-9]{3}-[0-9]{4}$", "-781-244-1212")
When run under Jupyter, we would see the expected results. The first number is conformant to the format and the second is not: