
SKS
New User
Jul 10, 2013, 9:07 PM
Post #1 of 4
(2079 views)
|
pattern matching
|
Can't Post
|
|
Hi there, I am a new perl user. I am trying to get a text in between two dots of a line, but my program returns the entire line. For example: I have a text which looks like My sampledata 1,2 for perl .version 1_1. I used the following match statement $x =~ m/(\.)(.*)(\.)/; my output for $x should be version 1_1 but I am getting the entire line as my match. I would greatly appreciate any help. Thanks.
|