Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

C. An Incredibly Brief Guide to Regular ... > What Regular Expressions Do

What Regular Expressions Do

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:

A yes/no answer

Something matched or it didn’t

A set of matches

All of the pieces that matched your query, so you can sort through them

A new string

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial