Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 10-11-2007, 02:17 PM   #1
Otter
Connoisseur
Otter has learned how to buy an e-book online
 
Posts: 65
Karma: 79
Join Date: Sep 2006
Location: Fairfax, Va
Device: PRS-500, PRS-505, PRS-650, ipod Touch, ipad 2, NC, Kindle Scribe
Using Find/Replace with BD

I love using BD, but am having trouble using its find/replace function. I have a document that is riddled with bracket enclosed numbers that I'd like to remove. Things like [1], [23], [245] etc. I can't seem to figure out how to use any type of wildcards within the brackets for BD to match on. I've tried reading the built-in tutorial on regexp, but yikes...waaay over my head.

Anyone know of a straightforward way to do this just using BD?

Many thanks in advance!
Otter is offline   Reply With Quote
Old 10-11-2007, 02:25 PM   #2
slayda
Retired & reading more!
slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.
 
slayda's Avatar
 
Posts: 2,764
Karma: 1884247
Join Date: Sep 2006
Location: North Alabama, USA
Device: Kindle 1, iPad Air 2, iPhone 6S+, Kobo Aura One
I don't know either but would sure be interested in the answer. The way I handled this problem before was to export to MS Word where I knew how to use wildcards. It worked but it would be much easier if I could have done it in BD.
slayda is offline   Reply With Quote
Old 10-11-2007, 02:33 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
if you hit f2, that brings up the search/replace dialog and you can search/replace on a RegExp. I don't have the code handy, but I have done it before and it has worked for me.
JSWolf is offline   Reply With Quote
Old 10-11-2007, 02:48 PM   #4
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Try this regular expression

\[[0-9]*\]

Or try this one:

\[[0-9]+\]
Nate the great is offline   Reply With Quote
Old 10-11-2007, 05:16 PM   #5
Otter
Connoisseur
Otter has learned how to buy an e-book online
 
Posts: 65
Karma: 79
Join Date: Sep 2006
Location: Fairfax, Va
Device: PRS-500, PRS-505, PRS-650, ipod Touch, ipad 2, NC, Kindle Scribe
Awesome, Nate...Nate the Great indeed.

Thanks a ton!
Otter is offline   Reply With Quote
Old 10-11-2007, 10:02 PM   #6
slayda
Retired & reading more!
slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.slayda ought to be getting tired of karma fortunes by now.
 
slayda's Avatar
 
Posts: 2,764
Karma: 1884247
Join Date: Sep 2006
Location: North Alabama, USA
Device: Kindle 1, iPad Air 2, iPhone 6S+, Kobo Aura One
Quote:
Originally Posted by Otter View Post
Awesome, Nate...Nate the Great indeed.

Thanks a ton!
Ditto!!
slayda is offline   Reply With Quote
Old 10-11-2007, 10:52 PM   #7
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
You are both welcome.

I happened to have a lex & yacc textbook next to me so I looked it up.

BTW, the '*' and '+' give slightly different results because

'*' matches zero or more characters inside the brackets, and

'+' matches one or more characters inside the brackets.

[a-z]
[A-Z]
[0-9]
[ ]
Each of the preceding is a variation of "match one of what's inside the brackets". They respectively mean look for only lowercase, uppercase, digits, and spaces. Note that the last one is not empty; it has a space in it. Also they can be combined.
[0-9a-zA-Z]
Please note the lack of spaces.

_{a,b} Match what is immediately before the brackets no less than a, no more than b.

_? Match zero or one occurrences of what's immediately before the '?'. Very useful for matching negative and positive numbers.

\_ Match whatever follows the '\' literally.

"match what is in between the quotes literally"


All of the above can be combined, but be careful.
That is most of what you will need for BD. Warning: I have not tested all of it in BD. But it is standard UNIX stuff from the textbook. It should work.

Last edited by Nate the great; 10-11-2007 at 10:56 PM.
Nate the great is offline   Reply With Quote
Old 02-28-2009, 01:49 PM   #8
svakanda
Enthusiast
svakanda began at the beginning.
 
svakanda's Avatar
 
Posts: 31
Karma: 44
Join Date: Feb 2009
Device: none
yeah use regexes, definitely the best way.
svakanda is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Find/Replace with regular expression hydrolith Sigil 6 03-01-2010 08:42 PM
Crashes on find / replace all mr ploppy Sigil 1 02-03-2010 12:35 PM


All times are GMT -4. The time now is 10:02 AM.


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