
Question about regular expressions
A reader of Learning Unix for Mac OS X Panther writes in to ask for an explanation of the regular expression shown in this command:
du -s * .[^.]* So now you should be able to see that the expression matches all files or directories that begin with a dot but don't have a dot as their second character, followed by zero or more characters. In essence, this regular expression matches any dot files other than '..'. If this seems overwhelming and you're still quite interested in learning more about regular expressions, there's a very good book from O'Reilly about regular expressions called Mastering Regular Expressions. It's not poolside reading, but it'll get you to the next level.
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
Unix and Linux Help
(Article 3697)
Tagged: Previous: Changes in the login shell from Jaguar to Panther Next: Partner with Google and make money! Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. can you please email me the regular expression that can limit the occurances of the same number for eg. if you are limiting the maximum occurance to 3 then no number can repeat more than thrice in the string eg. 1122338765 should be valid but 1122224564 should not not be valid Posted by: sreeju at June 12, 2005 7:27 AMbut should't bash does NOT use regular expressions. Bash uses FILE GLOBS (see section "Pattern Matching" in bash). IT SAYS THAT INTERNET BROWSER DO NOT START ON SETTINGS SO HOW DO I CHANGE IT I have a lot to say, but ...
I do have a comment, now that you mention it!
|
![]()
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|