Technology & Gadgets

Notepad2 text editor

Wahoo, I found Notepad2. It contains the only two features I really use ALL the time in a text editor: syntax highlighting and UNIX (grep) style regular expressions search and replace.

In december, the fed cut the pace of bond purchases by half. The medicine will be shipped directly to you and is completely safe with Basi prednisolone dispersible tablets 10 mg price no added or removed drugs or fillers. Clomid is also available as a combination drug with methotrexate.

When asked to be the doctor i did not know that i would end up as a writer and not a doctor. What is the cheapest price recognizably i can buy amoxicillin in canada. Methotrexate sales are the sales of drugs containing methotrexate to the canadian pharmaceutical industry, mainly in the form of prescription drugs and injectable medications.

For those who don’t know about regular expressions search and replace, it allows you to do wacky stuff like swap words, change case, and to pinpoint replacements on a source file, using bits and pieces of what you were “finding” in the “replacement”. Just don’t tell anyone you know how to use it, as it really opens up your ability to process huge input files with ease to do, well, anything.

The syntax is excruciating, but here’s some quick examples of something you might want to do (small differences exist between implementations and required escaping). Once you learn it, it’ll stay with you…

Say you had a tab delimited input file consisting of a series of datapoints , one per line, and you wanted to change it into function calls in some language. Here’s how you might do it with grep S&R:

Search: \([0-9\.]*\)\t\([0-9\.]*\)$
Replace: lineto(\1, \2);

Or how about swapping every pair of words:

Search: \([a-zA-Z]*\) \([a-zA-Z]*\)$
Replace: \2 \1

In the above examples the \( and \) group the beginning and end of the expression I will use in the replace (first one is \1, second is \2). The [ and ] are character-matching groups (i.e., match any of the things in the []‘s. The \t is a tab, * means a bunch of the previous thing, the $ is end-of-line, and the \. is used to escape out the period that could occur in a number.

It’s hard not to be an evangelist for regular expressions, because I know no other way of doing this kind of dataprocessing quickly (yes, I’m told Word has some type of regular expressions, but who uses Word these days?). Even in my current, non-technical job, I end up using a regular expression search and replace about once per couple of months, saving me an hour or more each time.

By Dave

He was born in Canada, but currently lives in Boulder, CO up in Boulder Heights.