December 2023
Intermediate to advanced
242 pages
5h 28m
English
| Recipe 64 | Extracting Text Enclosed in Double Quotes |
Suppose you have a movie review website, and you want to incorporate a mini-game widget into your page. The game prompts readers to guess the name of a celebrity based on a given nickname.
Your data source consists of a string that contains a list of celebrity names along with their corresponding nicknames, all enclosed in double quotation marks, like this:
| | 1. Dwayne Johnson, also known as "The Rock" |
| | 2. Scarlett Johansson, also known as "Scarjo" |
| | 3. Bradley Cooper, also known as "Coop" |
| | 4. Jennifer Lawrence, also known as "Nitro" |
| | 5. Hugh Jackman, also known as "Sticks" |
| | 6. Tom Hardy, also known as "Weasel" |
Your initial task is to extract the quoted texts from the string, so you can build ...
Read now
Unlock full access