in reply to extracting words with certain characters
The following code may get you started:
It looks for any words containing an underscore-character and prints them. Due to the loop and the /g-modifier it will even all words containing an underscoremy $words = "y____x_z dddetr x_y erre yyy_"; while ($words =~ /([\S]*_[\S]*)/g) { print "$1\n"; };
I intentionally wrote get you started, as there are some basic assumptions inside, e.g.:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: extracting words with certain characters
by ColonelPanic (Friar) on Dec 04, 2012 at 11:00 UTC |