Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
51
:
38
Back to Dashboard
Annotate First Pattern Match
Easy
Annotate First Pattern Match
You are given a string text containing words separated by spaces, and a list of patterns. For each word in text, find the first substring that matches any pattern (searching patterns in order). Wrap that substring in square brackets []. Only the first match per word is annotated. If no pattern matches a word, leave the word unchanged.
...