Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Regular expressions help your programs find chunks of text that match patterns you specify. Depending on how you call the regular expression, you may get:
Something matched or it didn’t
All of the pieces that matched your query, so you can sort through them
If you specified that this was a search-and-replace operation, you may have a new string with all of the replacements made
Regular expressions also offer incredible flexibility in specifying search terms. A key part of the reason that regular expressions look so arcane is that they use symbols to specify different kinds of matches, and matches on characters that aren’t easily typed.