Regular expressions can wreak havoc if you don't know what you're
doing, as I learned ever so painfully a few years ago by
destroying the contents of an entire folder using regular
expressions in UltraEdit. I wanted to delete [some words inside
brackets] like the foregoing, by searching for those words and replacing
them with nothing across numerous files.
In my files, those words actually were surrounded with brackets.
When you first install UE, "regular expressions" is checked in the search
and replace dialog box. Not knowing what regular expressions would do and
also not paying it any mind, I searched for [some words inside
brackets] and the program dutifully deleted all of those letters inside the
brackets wherever they appeared in every document within the folder,
rendering it useless. Destroyed was an accumulation of several years worth
of research on the Supreme Court of the US.
I was no happy camper. When I spoke to Ian Mead, the UE
developer, about it, he conveyed that programmers make up a
significant part of his audience and that they would know what
"regular expressions" would do, and that is, delete every example
of what is inside brackets.
PS: David, I am so glad your files have turned up. I keep my .ask
files on a different drive from the program. New installations
seem to know where to migrate to find the existing files, or I
tweak it slightly as Phil R describes. However, I do think the
company should offer more thorough warnings about what happens
with complete re-installations. For example, I lost my personally
configured toolbar after the recent re-installation. I would have
been happier if I could have taken the old tool bar configuration
with me. Not sure if that is possible.
| JulianFlor wrote:
| >I would suggest using an extra tool like a good text editor (notetab,
| >Ultraedit, Textpad) to copy the context of a asksam doc (that is, the
| >content of the pdf file) into this editor and have it clean these
| >text by "search&replace". Activating the option "regular expressions"
| >would convert any double, triple or what ever space into just one:
| >Search for: " +"
| >(two spaces and the +-sign, without "")
| >replace by: " "
| >(ONE space)
| >Reformatting broken lines (deleting line feeds at the end of line)
| >(in Notetab)
| >highligt the text you want to reformat and press Ctrl-J
| >Convert many blank lines into one (without regular expression
| >activated) would be:
| >search: ^p^p^p
| >replace by: ^p^p
| >and repeat this operation if necessary (askSam itself is able to do
| >this, but I'm not very lucky with its global operator - it is not
| >very stable - sometimes it works, sometimes not.
| >PS: I know that this is only a uncomfortable workaround, but as
| >someone said - PDF files are very difficult to export/reformat by
| >almost any external tool. The only exception I know of is dtSearch,
| >(Version 5.xx or higher) where you can toggle the option "show search
| >results in the internal viewer" and what you get is a simple, but
| >clean text output (extracted from the original pdf file no matter how
| >complex the original layout may be).