I'm no regexp guru, but I think something like the following would work:

"^[^.]$"

I believe, since the "." is inside the character class, it doesn't have the "match any character" special meaning. If I'm wrong, you'd have to escape it with a "\". The only problem is that this regexp will match non-printing characters as well. Perhaps you'd be better off to explicitly declare the characters you want to allow in the file name, something like this:

"^[-a-zA-Z0-9_]$"


Again, I'm not a regexp guru, so there are probably some bugs in these, but maybe it'll get you started on the right track.


Have fun,

Lloyd Brown





Ryan Bowman wrote:

I need a regular expression that will only match filenames with NO periods in them.  
My attempts so far don't seem to work at all, in the least.  Can someone give me a 
hint, please?


---- Ryan Bowman

I can feel the walls closing in on me,
the door at the end of the tunnel is far too small...
 - Closing In 2.0 - Don't Be Afraid - insoc.org
---


_____________________________________________________________ Linux.Net -->Open Source to everyone Powered by Linare Corporation http://www.linare.com/

____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list






____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to