Regular expressions can also be used to extract specific data from text. For example, if you have a list of email addresses and you want to extract all the domains, you can use a regex pattern like this:
/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/
This pattern will match and extract the domain part of the email addresses.