10-20-2012, 04:37 PM | #1 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Is the "Regex Builder" working??
Hola!
I am trying to test some new regex expressions using the "Regex Builder", but either I am way off base on how to use it or it is not working! I can enter and save search/replace regexes ok, and they do (well, MOST do, LoL) work; it is the ones that don't work that I need to test in the Regex Builder page. I can make the regexes work in OOO Writer, for example, using a HTML document and its search & replace function. But, that doesn't mean the same code will actually work in Calibre, so need to use the Builder! Procedure: 1. Open the Search & Replace menu/setup. 2. Put my regex into the "Search Regular Expression" (SRE) field 3. Select "Add", just in case, LoL. 4. Bring the added regex back to the SRE field 5. Select the "Wizard" button to the right of the SRE field 6. The "Regex Builder" window opens, with my regex in the "Regex:" field at the top 7. But, the "Preview" window is blank, and pressing the "Test" button does nothing 8. So, at the bottom there is a "Open" button, which presumably lets you open a document(?) that contains the data one is trying to search and replace 9. So, select the EPUB document and try to open it. Nothing, no document. Try a .html document. Nothing shows in the "Preview" page! Neither will it let me PASTE any text in it. So, either I totally misunderstand how to use this feature or it is broken. Somebody set me straight, please! Monty |
10-20-2012, 09:14 PM | #2 |
Gadget Freak
Posts: 1,169
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, Note 8
|
Without an example of the regex and the text attempting to match there is no way to help. *calibre 0.9.3, works fine for me.*
Edit: I would assume you have reviewed: An introduction to regular expressions. |
Advert | |
|
10-20-2012, 10:06 PM | #3 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Gunner,
I was not looking for specific regex 'code' help as much as why the "Wizard" window will not show ANY text with which to test a regex. But, fyi, here is a code (from Kovid) that works, but when I try to use it in the "Wizard", I still do not get any text in the wizard preview window: Code:
<b.*?>\s*Generated\s+by\s+ABC\s+Amber\s+LIT.*?</b> Code:
<b>.*?</b> to search within this line of text: <P><A HREF="http://www.abbyy.com/buy"><B>Y</B></A></P> to find the letter "Y" or any other text between the b tags I do not claim it is a 'good code', of course, just that as a test it should work, and something should show up in the wizard preview window I can use as a test. It doesn't. I am using W7 x64 with all the latest updates, java, and flash installed, so am puzzled why others say the wizard preview window works and mine doesn't... Thanks |
10-21-2012, 08:49 AM | #4 | |
Gadget Freak
Posts: 1,169
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, Note 8
|
Search & Replace: Preferences vs. Convert
It seems you are opening "Search and Replace" from the preference menu, as there is no 'open' button in the convert menu.
Quote:
Spoiler:
Spoiler:
Spoiler:
Spoiler:
calibre online User Manual. |
|
10-21-2012, 10:10 AM | #5 |
Addict
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Thanks...That did it!!
No where had I read that it COULDN'T be done from the Preferences menu..all the controls were there, not greyed out or anything!! Now I can run my stupid little tests.. Thanks again Monty |
Advert | |
|
10-23-2012, 08:36 AM | #6 |
Gadget Freak
Posts: 1,169
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, Note 8
|
Preferences is where your select/declare settings that will apply to every file, every time. There was no file to see when selecting the wizard icon as there was no file open for it to display.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Regex "FN LN" to "LN, FN" & reverse? | unboggling | Library Management | 19 | 11-20-2013 06:44 AM |
Problem with "Add Books" regex | wygit | Library Management | 9 | 07-24-2011 12:24 PM |
Do you use "Builder Worlds" in your writing? | Steven Lake | Writers' Corner | 22 | 10-04-2010 07:07 PM |
An explanation for the "Oops, We're Working On Your problem," page at the Sony Store | Dr. Drib | Sony Reader | 2 | 07-25-2009 07:40 AM |