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

Recipe 22.2. Matching Words

22.2.1. Problem

You want to pull out all words from a string.

22.2.2. Solution

The key to this is carefully defining what you mean by a word. Once you’ve created your definition, use the special character types to create your regular expression:


  

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