LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-28-2014, 10:10 PM   #1
topernic
LQ Newbie
 
Registered: Sep 2014
Distribution: arch, ubuntu, debian
Posts: 15

Rep: Reputation: Disabled
Posix regular expressions gurus


Ok, I looked and can't figure it out. I know I can do this easily in a spread sheet program but I was trying to do it as a search and replace in a text file.

The expressions consist of for example

Code:
http://www.linuxquestions.org/syndicate/lqlatest.xml "topernic subscriptions in feedly Cloud/Open Source"
What expression would I use to search for both
Code:
"
and all the characters in between?

I've been playing around at http://zytrax.com/tech/web/regex.htm#experiment for about an hour and still can't figure it out.
 
Old 09-29-2014, 01:03 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I do not really understand the question, but probably:
"[^"]*"
is what you are looking for.
 
1 members found this post helpful.
Old 09-29-2014, 01:50 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
My initial reaction was - "regex ain't regex". You (we) need to understand the context - basic, extended, perlre, ...

And I always prefer "+" to "*" unless there is a demonstrable need.
 
Old 09-29-2014, 06:49 AM   #4
topernic
LQ Newbie
 
Registered: Sep 2014
Distribution: arch, ubuntu, debian
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I do not really understand the question, but probably:
"[^"]*"
is what you are looking for.
That is it. Amazing.

Now I can spend some time and figure out why it works.
 
  


Reply



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
regular expressions schmitta Linux - Newbie 363 09-09-2019 04:44 PM
Regular Expressions nova49 Linux - Newbie 4 07-13-2011 07:05 AM
Regular expressions Khaj.pandey Linux - Newbie 19 04-21-2010 11:09 PM
\{a,b\} regular expressions sycamorex Linux - General 10 10-18-2008 06:38 PM
Regular Expressions ziggy25 Linux - Newbie 7 11-05-2007 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:55 PM.

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
Open Source Consulting | Domain Registration