Home | Arachnophilia | Documentation |     Share This Page
Searching & Replacing
Arachnophilia is © Copyright 2015, P. Lutus.

Arachnophilia is CareWare

Searching for and replacing text is such a constant activity in Web development, and in general programming, that Arachnophilia has a special bar dedicated to this purpose. It looks like this:

But, since we're going to be looking at all the search & replace features, click the button marked "Exp" at the right. You will see the expanded panel display:

The rules are simple:

The power of "All" and "Global" obviously means you will want to be careful — before pressing "All" or "Global," first satisfy yourself that you are searching for and replacing the desired text.

Both the search and replace windows remember what you have typed before, so if you need to repeat a search, you can get back your prior entry by opening the drop-down list and selecting instead of retyping it.

More rules and behaviors: Escape characters
The usual escape characters work for both normal and regular expression entries: \n = linefeed, \t = tab, and so forth. These escape characters work for both the search and replace fields. And, because "\" is used for the escape prefix, if you want to search for "\", enter it as "\\".
Long search entries
Avoid entering more than a few words into the main seach and replace windows. For longer search or replace fields, first write a macro to contain the text, then refer to the macro by name in the search and replace fields. To get the macro name, simply right-click the desired field and choose the name from the list that will appear.

If you enter too much text into a search or replace field, this may produce an unusable dropdown list. If this happens, you may need to remove the entry by editing the configuration file located at:

(user home directory)/.Arachnophilia/Arach.ini
And finally, a note about Regular Expressions. Selecting "RegExp" in the "RegExp Functions" window enables the regular expression parser, a very powerful tool that is rather advanced, and one that I won't be covering in detail here. If you want to learn how to use regular expressions, the Internet has a number of pages dedicated to this topic. A search engine like www.google.com will produce a list of them.

One more thing. An innocent-looking, poorly-written regular expression can lock up your program and your computer. Always save important documents before experimenting with regular expressions, and always save successful regular expression patterns in macros instead of trying to type them in from memory. And avoid using the "Instant" mode with regular expressions — a partially entered regular expression may have unexpected effects.


Home | Arachnophilia | Documentation |     Share This Page