in reply to Removing first part of string with regex

/(\.?)(\S+)/; print ">$1<>$2<\n";
If you have modified your code like the above, then you could be able to understand by yourself that, first group does not matches anything, and it is an optional match.
All the input are matched by second group.
Sathiyamoorthy