regex for extracting text

an example of using regular expression