BBEdit 13 Simplifies Pattern-Based Searching

Originally published at: https://tidbits.com/2019/10/11/bbedit-13-simplifies-pattern-based-searching/

The venerable text editor stays fresh in its latest version with the addition of a Pattern Playground that lets you experiment interactively with grep-based searches, a Grep Cheat Sheet, live search result highlighting, and more.

3 Likes

Thanks for the article. It has been many years since I have needed BBedit, so long I can’t even remember what I was doing. Now retired, so unlikely to need BBedit. But I really enjoy the articles about BBedit, amazed at the power of the program.

Kudos to the BBEdit team! I am a heavy user of grep, but there is often a trial-and-error process to get the right pattern, and it’s always a necessity to test the find before replacing, lest more is replaced than intended. The Pattern Playground promises to make both of those much more convenient. And I still have to occasionally look in the manual for less-used codes, so the pop-up cheatsheet is very helpful as well.

1 Like

thank you Adam for an excellent article

1 Like

Thanks Adam. I use grep a lot, but unskilfully, so the new playground will be handy. I specially like the way the cheat sheet explains lookahead and lookbehind patterns, and their negatives, which always confuse me. It’s not quite as good as the excellent RegExRX from MacTechnologies Consulting, but the fact that it’s built into BBEdit is excellent.

Edit > Select > Highlighted Matches is going to be useful, too.

1 Like

Actually the most useful feature of Pattern Playground, live search result highlighting, occurs with the regular Find & Replace function now, too! So the Playground isn’t needed at all to refine at least the Find. And today I had to look in the manual anyway to include line breaks in “.”, because switches aren’t listed in the Playground’s cheatsheet. Another one that isn’t there is “?” used as the non-greedy limiter.

Good points, @eric2. I need constant reminders about non-greedy searches.

I hope the Playground will evolve. One of the good things about RegExRX is its live view showing how the complete document will look after the specified replacement pattern is applied. That would be a handy addition. At the moment in the Playground you have to click through each instance one by one.

1 Like

These are great suggestions for Bare Bones, and I’ll be sure to pass them on to Rich Siegel.

Thanks Adam – and please thank Mr Siegel for all his hard work to date.

1 Like

I have used regex for many years now in BBEdit, Indesign and Perlscripts. This week I have worked with converting Markdown to html. The new Search/Replace interface in BBEdit is just great. I have never mastered regex over several lines in BBEdit before, like I am used to in Perl, now that works and is easy.

1 Like