LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-12-2018, 02:26 AM   #16
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,833
Blog Entries: 1

Rep: Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229Reputation: 1229

Quote:
Originally Posted by fick_manning View Post
i understood that if i put the nine it tells the command that there is what to read from and therfor there are permittion..from whatsapp group
so i could put any number that i want?
I'm sorry I did not understand your first sentence. Yes, you can put whatever number you require in a particular scenario.

Please have a look at that
http://www.robelle.com/smugbook/regexpr.html
 
Old 10-12-2018, 03:32 AM   #17
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: MacOS, Slackware
Posts: 315

Rep: Reputation: 93
As explained by BW-userx, you should really edit your initial post again and *put back your question* because it's really a mess for newcomers of this thread to get what it is all about here...
 
Old 10-12-2018, 05:10 PM   #18
Mike25
Member
 
Registered: Feb 2003
Location: ON, Canada
Distribution: Fedora & RH3
Posts: 45
Blog Entries: 2

Rep: Reputation: 10
From "man grep" in shell:

Quote:
Repetition
A regular expression may be followed by one of several repetition operators:
? The preceding item is optional and matched at most once.
* The preceding item will be matched zero or more times.
+ The preceding item will be matched one or more times.
{n} The preceding item is matched exactly n times.
{n,} The preceding item is matched n or more times.
{,m} The preceding item is matched at most m times. This is a GNU extension.
{n,m} The preceding item is matched at least n times, but not more than m times.
The brackets have a slash in front of them to escape them, so the {9} means to match 9 times.

I did a lot of my studying by reading the "man"uals. Several years ago I even printed out a lot of them and have a 2" binder full of man pages.
 
Old 10-13-2018, 01:04 AM   #19
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 934

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
There are two types of RE,
BRE (basic regular expression) and ERE (extended regular expression).
grep and sed default to BRE, while egrep (or grep -E) and sed -r and awk and perl and php (and most modern languages) use ERE.
The following is BRE
Code:
grep "^[-d][^-]\{9\}"
The [-d] is a character set, a character that can be either - or d
You can also write [d-]
The first character ^ in a character set is a negation of the following, [^-] is a character that is not a -
The \{ \} is a repetion of the previous character, here the character set: here 9 characters that are not a -

Last edited by MadeInGermany; 10-13-2018 at 01:05 AM.
 
1 members found this post helpful.
  


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
[SOLVED] jhalfs sed: -e expression #1, char 55:Invalid preceding regular expression percy_vere_uk Linux From Scratch 10 07-22-2017 08:15 AM
[SOLVED] what does this regular expression do? smeezekitty Programming 10 10-07-2009 07:12 PM
Help with regular expression Feyd-Rautha Programming 8 04-21-2008 12:18 PM
about regular expression '=~m//' littletransformer Programming 7 03-25-2008 09:31 PM
Need help with regular expression aecaudel Programming 6 11-04-2005 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:11 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