<jupyter_start><jupyter_text>Using regular expressions, extract from the email- numbers (e.g. social and phone numbers)- email address- license plates<jupyter_code>import re
social = re.compile('\d+-\d+-\d+')
social.findall(email)
phone = re.compile('\+\d+[ ()\d]+')
phone.findall(email)
email_ = re.compile('\w+[.\w]+@\w+\.\w{3}')
email_.findall(email)
license = re.compile('[\d-]*[A-Z]+-[\dA-Z]+')
license.findall(email)<jupyter_output><empty_output><jupyter_text>Blank out this sensitive information using *<jupyter_code>for regex in [social, phone, email_, license]:
    email = regex.sub('******', email)
print(email)<jupyter_output>Hi Jane, 
I hope you are doing well. As I explained in my previous message, 
Mr. James' social is ******. His email is ******
Please get in touch with him ASAP.

Also, Mr. Bond will be dribing his Aston Martin, it has a 3-way revolving front number 
plate showing ******, ****** or ******. Please ensure paying tolls
for all. If you have any questions, please contact me: ******
{'fraction_non_alphanumeric': 0.17913385826771652, 'fraction_numerical': 0.001968503937007874, 'mean_word_length': 4.982352941176471, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '431382', 'license': 'MIT', 'n_tokens_mistral': 345, 'n_tokens_neox': 339, 'n_words': 108, 'path': '11-wamrup-solution_regular_expressions.ipynb', 'repo_name': 'hanisaf/advanced-data-management-and-analytics', 'size': '1016'}