Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-28-2017, 02:39 PM   #1
LQ Newbie
Registered: Sep 2016
Posts: 28

Rep: Reputation: Disabled
Smile Regular Expression Question on the command line

It is either 10 or 11 letters, Only includes the letters a, b, c, A, B, C
Only contains number 1 and number 9 and exclamation mark

Is this correct?

--regex-only "^.{11,12}$" -%[abcABC19!]
Thanks a lot, Stack Overflow!

It is for running a python script on the command line and I want to give it the appropriate options~

Last edited by snowmagician; 12-28-2017 at 02:56 PM.
Old 12-28-2017, 03:25 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Could be:
Old 12-28-2017, 06:22 PM   #3
LQ Newbie
Registered: Sep 2016
Posts: 28

Original Poster
Rep: Reputation: Disabled
This is my overall input at the command line

> python --regex-only "^[abcABC19\!]{11,12}$"
It is not giving me any error message, but it is not giving me anything else either.

It did give me an error at first, which read, "Event not found" and I placed \ in front of ! and the "Event not found" error message vanished.

I notice my CPU usage is rather high which means my laptop is working on the script

Last edited by snowmagician; 12-28-2017 at 06:24 PM.


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] awk/se: splitting a multi-line input at a regular expression and rearranging sarenace Programming 9 11-27-2012 10:00 AM
Extracting all the matching patterns in each line -Regular expression AWK ksvinaykumar Linux - Newbie 7 04-10-2012 10:48 AM
[SOLVED] sed or awk help - need to remove text on each line before a regular expression kmkocot Linux - Newbie 15 10-30-2009 04:20 AM
Searching for regular expression in command line Jean Of mArc Programming 9 08-11-2008 09:01 PM
PERL:how to find a blank line in a file--regular expression littletransformer Programming 4 03-27-2008 07:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:59 PM.

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