LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2010, 08:35 PM   #1
Rode
LQ Newbie
 
Registered: Aug 2009
Posts: 21

Rep: Reputation: 0
How can I understand this?


Hello,
will anybody give an interpretation of the match sentence like that? /^[^#]/, the purpose is to match lines without # as its first character. I just want to know the how it works.
 
Old 01-17-2010, 08:38 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
The first "^" means: at the start of a line.
The [^#] means: any character EXCEPT a "#" because when ^ is the first character inside [these brackets] it means NOT the next character(s).

Sasha

PS - look up "man 7 regex" or "man regex" or Google "regular expressions" for much more
 
1 members found this post helpful.
Old 01-17-2010, 11:49 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Is this related to your question back in August? Are you still working in the same place?

What books and tutorials have you been using?
 
Old 01-18-2010, 03:38 AM   #4
Rode
LQ Newbie
 
Registered: Aug 2009
Posts: 21

Original Poster
Rep: Reputation: 0
thanks

Quote:
Originally Posted by pixellany View Post
Is this related to your question back in August? Are you still working in the same place?

What books and tutorials have you been using?
Thank you for asking. In deed, I had solved that problem sooner after i started a question in this forum. All what I want to do is just trying to know more about it since i never had any background in linux and i surely have to use it occasionally. This question now is just what came to me in a sudden. I really want to read some good tutorials when time is allowed if you can give some recommendation.
thank you again.
 
Old 01-18-2010, 09:16 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
In addition to what was recommended in August:

Bash Guide for Beginners---free at http://tldp.org

Linux in a Nutshell from O'Reilly
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can somebody help me to understand... Kristoffer G Mandriva 1 09-06-2007 07:38 AM
Why, help me understand what is going on..... jymmi Ubuntu 9 05-22-2007 11:12 PM
I don't understand this at all FowlProgrammer Linux - Newbie 1 02-25-2007 02:38 PM
can not understand ramanadyv Linux - General 1 06-06-2006 08:13 AM
i don't understand... humanveal Linux - Software 17 05-20-2003 04:24 AM


All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration