How much different to Textpad?

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
townski
Posts: 6
Joined: Wed May 05, 2004 8:47 am

How much different to Textpad?

Post by townski »

At £8.50 I feel like I should just buy it regardless... but before I do that I'd like to ask ...is there a *lot* more control over multiple files? I'm used to doing 'find in files' in textpad then opening all files and doing a search & replace - then save all. Does WildEdit do anything extra to that? Thanks people.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Most important difference for me: multiline regexes work (something like \n+ is working in WildEdit but not in Textpad).
ben_josephs
Posts: 2457
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

MudGuard wrote:multiline regexes work (something like \n+ is working in WildEdit but not in Textpad).
Well, they'll work when they're fixed. :-) (It happens that I have no problem here, as (almost) all my text files have Unix line endings.)

The promotion of \n to the status of first-class character is just one benefit of using John Maddock's regular expression package (http://www.boost.org/libs/regex/doc/index.html). Look at WildEdit's help file, under Reference | Regular Expression Syntax.

Here are a couple of other nice things:

Lookahead assertions: xyz(?=abc) means match xyz if it's followed by abc (but don't match the abc). And xyz(?!abc) means match xyz if it's not followed by abc.

Non-greedy repeats: <tag>(.*?)</tag> means match the shortest possible tag-delimited string.

Edit: Typo corrected.
Last edited by ben_josephs on Tue Jun 01, 2004 7:52 am, edited 1 time in total.
User avatar
s_reynisson
Posts: 940
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

I find the non-greedy repeats and the multi-line regex the biggest improvement from the TP regex engine. But getting control on the fonts for the input fields is right up there, the size and monospaced attributes. Much better when working with long regex's.
Then I open up and see
the person fumbling here is me
a different way to be
ben_josephs
Posts: 2457
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

s_reynisson wrote:But getting control on the fonts for the input fields is right up there, the size and monospaced attributes.
It would be nice to be able to change the font without editing config.xml.
townski
Posts: 6
Joined: Wed May 05, 2004 8:47 am

Post by townski »

First thing, you're all obviously way more advanced than myself! OK so let's say I wanted to search through a load of excel spreadsheets to find those that contain 2 separate words, such as the customer name 'smith' and a specific other word such as 'hosting'. Is this the kind of thing WildEdit's going to help me with? If I can do this in Textpad I'd be grateful for the syntax and you have my apologies for asking in the wrong group.
ben_josephs
Posts: 2457
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

In what textual form are you saving your work sheet? Presumably there is one record per line.

Then a suitable search expression might be based on

Code: Select all

smith.*hosting|hosting.*smith
To find all records containing "smith" and "hosting" in either order:

In TextPad, Search | Find In Files... with the above search expression will bring up a hypertext window listing all such records.

In WildEdit, with the option '.' does not match a newline character selected, the above search expression will find all such records.

Which tool is better for your purposes, and how to achieve them, depend on what precisely your purposes are...
townski
Posts: 6
Joined: Wed May 05, 2004 8:47 am

Post by townski »

ben_josephs - thanks for that. I noted that (in Textpad) if I do CTRL-F5 for

Code: Select all

smith.*hosting
it doesn't find anything whereas....

Code: Select all

hosting.*smith
does find the correct files.

Great, but when I search for

Code: Select all

smith.*hosting|hosting.*smith
it doesn't return anything. Regular expression is ticked in both cases. I just wonder if this is misbehaving with it being an xls file?

Having tried WildEdit now, it looks very handy but as a replace tool which is not what I want to do in this case, I simply need to look through Excel invoices where they contain 'customer name' AND 'specific service'. I've kept it simple by looking for a unique customer's surname and the word 'hosting'. At least I now know to use ' searchterm1.*searchterm2 ' which has been useful! Thanks again.
ben_josephs
Posts: 2457
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

townski wrote:I noted that (in Textpad) if I do CTRL-F5 for

Code: Select all

smith.*hosting
it doesn't find anything whereas....

Code: Select all

hosting.*smith
does find the correct files.
That would be because "hosting" occurs before "smith" within a record.
townski wrote:Great, but when I search for

Code: Select all

smith.*hosting|hosting.*smith
it doesn't return anything. Regular expression is ticked in both cases. I just wonder if this is misbehaving with it being an xls file?
Either use \| instead of | or select Configure | Preferences | Editor | Use POSIX regular expression syntax.

*.xls files are not text files, and are not suitable for editing by a text editor.
townski
Posts: 6
Joined: Wed May 05, 2004 8:47 am

Post by townski »

ben_josephs - fantastic... that's helped me so much, thanks for that, sorry for the delay in replying.
Post Reply