Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2010, 09:52 PM   #1
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Grep Find & Replace

I am a novice Grep user.

Can someone help me with the Grep expression to FIND all text within parentheses, including the parentheses themselves, and the blank space before and after?

BRFORE: Yada yada (text text) yada yada.

AFTER: Yada yada yada yada.

Thanks - Fabe
Fabe is offline   Reply With Quote
Old 12-06-2010, 06:02 AM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Fabe, would it be something like
Search for
Code:
\s\(.+?\)\s
replace with a single space (or remove one of the the '\s' and replace with nothing.

Edit:
\s = whitespace
\( = open parenthesis
.+? = any text possibly none
\) = close parenthesis
\s = whitespace

Last edited by Perkin; 12-06-2010 at 06:04 AM. Reason: Extra information
Perkin is offline   Reply With Quote
Advert
Old 12-06-2010, 07:58 AM   #3
Fabe
Dylanologist
Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.Fabe has survived committing the World's Second Greatest Blunder.
 
Fabe's Avatar
 
Posts: 200
Karma: 146754
Join Date: Apr 2010
Location: Hanover, New Hampshire, USA
Device: none/all/any
Quote:
Originally Posted by Perkin View Post
\s\(.+?\)\s
Perkin - Thank you, that worked perfectly. I learned several things, much obliged.

##########

ADDENDUM:

There is a flaw. If there are two parenthetical entries in a paragraph, this FIND & REPLACE eliminates the text between them along with what's inside.
EXAMPLE:

Now is the time for all good men (and women for that matter) to come to the aid of (or at least make a donation to) their country.

RETURNS:

Now is the time for all good men their country.
What to do? - Fabe

Last edited by Fabe; 12-06-2010 at 09:18 AM. Reason: Flaw Found
Fabe is offline   Reply With Quote
Old 12-06-2010, 12:00 PM   #4
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
I think that depends on which version/adaptation you're using.
Also if the version your using has a switch to allow 'minimal matching' (or lazy) (much like the Sigil S&R dialog) that should then capture correctly.

That's what the '?' should be doing anyway.
You could also try changing the '+' to '*'
Perkin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Word - Find & Replace Big Kev Workshop 3 09-21-2010 06:51 PM
REGEX find and replace help please potestus Sigil 13 09-18-2010 04:14 PM
find and replace, epub ampsonic Reading and Management 3 03-02-2010 03:20 AM
Crashes on find / replace all mr ploppy Sigil 1 02-03-2010 12:35 PM
Using Find/Replace with BD Otter Sony Reader 7 02-28-2009 01:49 PM


All times are GMT -4. The time now is 12:24 PM.


MobileRead.com is a privately owned, operated and funded community.