Hello Note that the character dot is not a number so your regular expression cannot match a string like 1.2
You can use the regular expression (\d+\.)+ But as the dot character may be present or not you can use the regular expression /Test (\d+\.?)+/ Regards Alex 2011/12/20 Saravanan Murugaiah <[email protected]>: > Dear All, > > I am a learner in Perl and this is my first post in this group. I need to > search a word "Test 1.2.1" in my file. I am using "$_ =~m/Test \d+", but it > searched only "Test 1" not the full content. I need to check whether it is > "Test 1" or "Test 1.2" or "Test 1.2.1". Kindly help me in this regard > > Regards, > MadYuv -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
