Buggy Perl regular expression
Posted
by Tichomir Mitkov
on Stack Overflow
See other posts from Stack Overflow
or by Tichomir Mitkov
Published on 2010-04-21T07:54:36Z
Indexed on
2010/04/21
8:03 UTC
Read the original article
Hit count: 266
Hi, there
I'm writing a program that has to get values from a file. In the file each line indicates an entity. Each entity has three values. For example:
Value1 Value2 value3
I have a regular expresion to match them
m/(.*?) (.*?) (.*?)/m;
But it seems that the third value in never matched! The only way to match the third value is to add another value in the file and another "matching brackets" in the expresion. But this does not satisfy me.
Thanks in Advance!
© Stack Overflow or respective owner