Regular Expressions Finally Come To Microsoft Excel

There are two types of people in the world: those who have no idea what a regular expression is, and those who not only know what they are but can compose them on the fly and tend to use them in situations where they’re clearly not called for. And it’s that latter camp, of which we consider ourself a proud member, that is rejoicing with the announcement that Microsoft is adding regular expression support to Excel.

Or perhaps not rejoicing so much as wondering what took so long. Yes, regular expressions have been part of VBA for a while now, but the new functions allow you to use regexes right in the spreadsheet grid. There are plenty of caveats, of course. The big one is that this is still in beta at this time, so you have to do some gymnastics to enable it, if you’re even allowed to in the first place. Second, support appears limited to three functions at the moment: REGEXTEST, which provides a logical test of pattern matching; REGEXEXTRACT, which returns a substring that matches a pattern; and REGEXREPLACE, which substitutes a string for a pattern. The video below walks through how to use these functions within spreadsheets.

What’s also unclear now is what flavor of regular expressions is supported. There are a bewildering number of entities in the regex bestiary — character classes, positional indicators, quantifiers, subexpressions, lazy and greedy matches, and a range of grouping constructs that perplex even regex pros. One hopes these new functions will support one of the existing regex standards, but Microsoft is famous for “extending and enhancing.” Then again, regex support has been in the .NET Framework for years and is pretty close to the Perl standard, so our guess is that it’ll be close to that.

If you fall into the “What’s a regex?” camp but want to change that, why not get your grep on?

Continue reading “Regular Expressions Finally Come To Microsoft Excel”

Hackaday Podcast Episode 272: Desktop EDM, Silence Of The Leaves, And The Tyranny Of The Rocket Equation

With Elliot off on vacation, Tom and Dan made a valiant effort to avoid the dreaded “clip show” and provide you with the tastiest hacker treats of the week. Did they succeed? That’s not for us to say, but if you’re interested in things like non-emulated N64 games and unnecessarily cool filament sensors, this just might be one to check out.

We also came across a noise suppressor for a leaf blower, giant antennae dangling from government helicopters, and a desktop-friendly wire EDM setup that just might change the face of machining. We waxed on about the difference between AI-generated code and just pulling routines from StackExchange, came to the conclusion that single-stage-to-orbit is basically just science fiction, and took a look at the latest eclipse from 80,000 feet, albeit a month after the fact.

Worried about attracting the Black Helicopters? Download the DRM-free MP3 and listen offline, just in case.

Continue reading “Hackaday Podcast Episode 272: Desktop EDM, Silence Of The Leaves, And The Tyranny Of The Rocket Equation”

Console Calculator Moves One Step Closer To Original Design

With smartphone apps and spreadsheets being the main ways people crunch their numbers nowadays, there’s not much call for a desktop calculator. Or any other physical calculator, for that matter. Which is all the more reason to appreciate this  Wang 300-series calculator console’s revival through a new electronic backend.

If you haven’t made the acquaintance of the Wang calculator series, [Bob Alexander]’s previous Wang project is a perfect introduction. Despite looking very much like an overbuilt early-70s desktop calculator, what you see in the video below is just a terminal, one of four that could connect to a shared “Electronics Package” where most of the actual computational work was done. The package was big and is currently hard to come by, at least at a reasonable price, but the consoles, with their Nixie displays and sturdy keypads, are relatively abundant.

[Bob]’s previous venture into reviving his console involved embedding a PIC32-based controller, turning it into the standalone desktop calculator it never was. To keep more with the original design philosophy, [Bob]’s second stab at the problem moves much of the same circuitry from inside the console into a dedicated outboard package, albeit one much smaller than the original. The replacement package extends and enhances the console functionality a bit, adding a real-time clock and a Nixie exercise routine to ward off the dreaded cathode poisoning. [Bob] also recreates the original Wang logarithmic method of multiplication and division, which is a nice touch with its distinctive flashing display.

Seeing the Wang console hooked up to a package through that thick cable and Centronics connector is oddly satisfying. We’d love to see [Bob] take this to the logical extent and support multiple consoles, but that might be pushing things a bit.

Continue reading “Console Calculator Moves One Step Closer To Original Design”

Passive Diplexer Makes One Antenna Act Like Two

Stay in the amateur radio hobby long enough and you might end up with quite a collection of antennas. With privileges that almost extend from DC to daylight, one antenna will rarely do everything, and pretty soon your roof starts to get hard to see through the forest of antennas. It may be hell on curb appeal, but what’s a ham to do?

One answer could be making one antenna do the work of two, as [Guido] did with this diplexer for dual APRS setups. Automatic Packet Reporting System is a packet radio system used by hams to transmit telemetry and other low-bandwidth digital data. It’s most closely associated with the 2-meter ham band, but [Guido] has both 2-meter (144.8-MHz) and 70-cm LoRa (433.775-MHz) APRS IGates, or Internet gateway receivers. His goal was to use a single broadband discone antenna for both APRS receivers, and this would require sorting the proper signals from the antenna to the proper receiver with a diplexer.

Note that [Guido] refers to his design as a “duplexer,” which is a device to isolate and protect a receiver from a transmitter when they share the same antenna — very similar to a diplexer but different. His diplexer is basically a pair of filters in parallel — a high-pass filter tuned to just below the 70-cm band, and a low-pass filter tuned just above the top of the 2-m band. The filters were designed using a handy online tool and simulated in LTSpice, and then constructed in classic “ugly” style. The diplexer is all-passive and uses air-core inductors, all hand-wound and tweaked by adjusting the spacing of the turns.

[Guido]’s diplexer performs quite well — only a fraction of a dB of insertion loss, but 45 to 50 dB attenuation of unwanted frequencies — pretty impressive for a box full of caps and coils. We love these quick and dirty tactical builds, and it’s always a treat to see RF wizardry in action.

Hackaday Links Column Banner

Hackaday Links: May 19, 2024

If there was one question we heard most often this week, it was “Did you see it?” With “it” referring to the stunning display of aurora borealis — and australis, we assume — on and off for several days. The major outburst here in North America was actually late last week, with aurora extending as far south as Puerto Rico on the night of the tenth. We here in North Idaho were well-situated for prime viewing, but alas, light pollution made things a bit tame without a short drive from the city lights. Totally worth it:

Hat tip to Tom Maloney for the pics. That last one is very reminiscent of what we saw back in 1989 with the geomagnetic storm that knocked Québec’s grid offline, except then the colors were shifted much more toward the red end of the spectrum back then.

Continue reading “Hackaday Links: May 19, 2024”

Flexures Keep This Printed Displacement Sensor In Line

When the job at hand is measuring something with micron-range precision, thoughts generally turn to a tool with a Mitutoyo or Starrett nameplate. But with a clever design and a little electronics know-how, it turns out you can 3D print a displacement sensor for measuring in the micron range for only about $10.

While the tool that [BubsBuilds] came up with isn’t as compact as a dial indicator and probably won’t win any industrial design awards, that doesn’t detract from its usefulness. And unlike a dial indicator — at least the analog type — this sensor outputs an easily digitized signal. That comes courtesy of a simple opto-interrupter sensor, which measures the position of a fine blade within its field of view. The blade is attached to a flexure that constrains its movement to a single plane; the other end of the flexure has a steel ball acting as a stylus. In use, any displacement of the stylus results in more or less light being received by the phototransistor in the opto-interrupter; the greater the deflection, the less light and the lower the current through the transistor. In addition to the sensor itself, [Bub] printed a calibration jig that allows precision gauge blocks or simple feeler gauges to be inserted in front of the stylus. The voltage across the emitter resistor for these known displacements is then used to create a calibration curve.

[Bub] says he’s getting 5-micron repeatability with careful calibration and multiple measurements of each gauge block, which seems pretty impressive to us. If you don’t need the digital output, this compliant mechanism dial indicator might be helpful too. Continue reading “Flexures Keep This Printed Displacement Sensor In Line”

Put A Little Pigeon In Your Next Clock Project

If you’re anything like us, you’ve probably wondered why gear teeth are shaped the way they’re shaped. But we’ll go out on a limb and say you’ve never wondered why gear teeth aren’t shaped like pigeons, and what a clock that’s not quite a clock based around them would look like.

If this sounds like it has [Uri Tuchman] written all over it, give yourself a cookie. [Uri] has a thing for pigeons, and they make an appearance in nearly all his whimsical builds, from his ink-dipping machine to his intricately engraved metal mouse. For this build, pigeons are transformed into the teeth of a large, ornate wheel, cut from brass using an impressive Friedrich Deckel pantograph engraver. To put the pigeon wheel to work, [Uri] built an escapement and a somewhat crooked pendulum, plus a drive weight and dial. It’s almost a clock, but not quite, since it doesn’t measure time in any familiar units, and the dial has a leg rather than hands — classic [Uri].

It may not be [Clickspring]-level stuff, but it’s still a lovely piece of work, and instructive to boot. The way [Uri] figured out the profile for the meshing teeth by looking at the negative space swept out by the pigeon profiles was pretty sweet. Plus, pigeons.

Continue reading “Put A Little Pigeon In Your Next Clock Project”