in reply to Regex capture between word and punctuation
How do I write a program that prints only words (not the entire line) in the file part3.txt (attached) on a word boundary that have the letter "p" or "P" in them?
the part3.txt is
" CPAN stands for comprehensive Perl Archive Network. ^ and $ are used as anchors in a regular expression. /pattern/ is a pattern match operator. Perl is very easy to learn. Enter 'H' or 'h' for help."
In that case, please see Pattern matching, and don't bother posting a new question.
Out of curiosity, what book are you using? It seems to be a poor one (based on the number of times these questions have been asked).
-driver8Update: It appears you didn't get my message in time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex capture between word and punctuation
by negzero7 (Sexton) on Mar 19, 2008 at 01:49 UTC |