|
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.
Categorized:
Unix and Linux Help
(Article 3697,
Written by Dave Taylor)
Tagged: Previous: Changes in the login shell from Jaguar to Panther Next: Partner with Google and make money! Subscribe!
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 something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |