in reply to Re^3: Regex \. help
in thread Regex \. help

#!/usr/bin/perl @filename = `ls | grep "^regex\.[0-9]"`; print @filename; ...

prints regex.1. I need it to print regex and regex.1:

#!/usr/bin/perl @filename = `ls | grep "^regex\.?[0-9]"`; print @filename;

Doesnt print anything.

Shouldnt the ? match the . zero or more times? If so why doesnt it print regex and regex.1 As for the .abc I need that to be excluded when it greps. So and wont print.

Thank you for the help so far, I am still stuck on making this work. I will continue to try to make this work, if anyone could assist further I would be very thankful.