Nov 18, 2011, 4:25 AM
Post #2 of 3
Whether or not the grep function is useful, depends on how you want to process the result. A more frequently used solution is, however, to loop through the file and apply your regex to each line.
Re: [slekness] extract some text from a webpage
[In reply to]
Note that the pattern matching operator in Perl is =~
(See perldoc perlop)
BTW, your regexp doesn't fulfil the condition "ends in a whitespace", because the word string might also be terminated, for instance, by a dot, comma, or uppercase letter (for this reason, your example string ".... %Get_This123 ..." would not match).