1.My regular expression below is not matching for all the list of inputs,it fails in the first example provided below,how to make the "#\d+," optional in my regex so that it matches only if it is present..also is there a way I change .* to be more specific? 2.Also I keep getting the below warning at line "print "$path$ver\n";" Use of uninitialized value in concatenation (.) or string at orphan_overwrite.pl line 40, <IN>

Yes,actually there is more data before,there are couple of lines before ... ... branch from,does that make a difference? I keep getting the following message and incorrect output when I use the below regex