LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I understand this? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-understand-this-782857/)

Rode 01-17-2010 07:35 PM

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.

GrapefruiTgirl 01-17-2010 07:38 PM

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 ;)

pixellany 01-17-2010 10:49 PM

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?

Rode 01-18-2010 02:38 AM

thanks
 
Quote:

Originally Posted by pixellany (Post 3830408)
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.

pixellany 01-18-2010 08:16 AM

In addition to what was recommended in August:

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

Linux in a Nutshell from O'Reilly


All times are GMT -5. The time now is 01:07 AM.