KimberlyHirsh
KimberlyHirsh

It’s a rough time right now so I’m trying to notice small joys and one of today’s is that I learned how to use regular expressions in advanced text editors to remove timestamps and extra lines from Zoom transcripts.

|
Embed
Progress spinner
spgreenhalgh
spgreenhalgh

@KimberlyHirsh I love regular expressions even though I barely understand them, so I am here for all small joys of this very specific kind.

|
Embed
Progress spinner
chrisaldrich
chrisaldrich

@KimberlyHirsh I hope things are improving as your week progresses. Do share these arcane secrets as you find them as I'm tiring of removing some of these things manually every couple of days. :)

|
Embed
Progress spinner
Miraz
Miraz

@KimberlyHirsh I love regular expressions! It's such a feeling of major achievemnt to write one that does something so useful. 🙌🏼

|
Embed
Progress spinner
KimberlyHirsh
KimberlyHirsh

@Miraz @chrisaldrich @spgreenhalgh I copied and pasted other people's regular expressions. Wouldn't even know how to make my own. I'll do a quick post about this one.

|
Embed
Progress spinner
Miraz
Miraz

@KimberlyHirsh Since you have BBEdit, make sure to use the Pattern Playground feature under the Search menu. It helps develop the pattern as it shows live results without actually applying it. The BBEdit manual has an excellent section on Grep too.

|
Embed
Progress spinner
odd
odd

@Miraz Doh! 🤦🏻‍♂️ I forgot to install it on my recently scratched MBP.

|
Embed
Progress spinner
Miraz
Miraz

@odd Do it now! 😆

|
Embed
Progress spinner
KimberlyHirsh
KimberlyHirsh

@Miraz This is beyond me. I actually did it in Notepad++ but will be trying BBEdit tomorrow so we'll see how it goes!

|
Embed
Progress spinner
Miraz
Miraz

@KimberlyHirsh If you don't have digits within the text you want to retain you could actually use BBEdit's Process Lines Containing menu item (under Text) to Find lines that contain \d using Grep and delete matched lines. Boom.

|
Embed
Progress spinner
spgreenhalgh
spgreenhalgh

@KimberlyHirsh @chrisaldrich "Good programmers borrow, great programmers steal" is what I always say. Of course, the best programmers share. :)

|
Embed
Progress spinner
KimberlyHirsh
KimberlyHirsh

@Miraz I think there might be some digits I do want.

|
Embed
Progress spinner
In reply to
KimberlyHirsh
KimberlyHirsh

@spgreenhalgh And that's why I wrote a blog post about how to do it.

|
Embed
Progress spinner
Miraz
Miraz

@KimberlyHirsh Always good to know that. If there were some other unique character (you had an arrow in the timestamp in your example) you could use that. Just pointing out a possibly simpler approach. I love Grep but sometimes it can be circumvented. 😀

|
Embed
Progress spinner
hollie
hollie

@KimberlyHirsh Sorry, I'm new here, just diving in - I saw the word "BBEdit" and immediately had flashbacks to sitting at my orange iMac in 1999 and designing my own little website. I didn't know that app was still around! I'm going to have to download it tomorrow and mess about.

|
Embed
Progress spinner
KimberlyHirsh
KimberlyHirsh

@hollie Welcome! I hope it's fun!

|
Embed
Progress spinner
jemostrom
jemostrom

@hollie 😋 I've been using BBEdit since it was first released and still use it every day

|
Embed
Progress spinner
hollie
hollie

@KimberlyHirsh Thank you!

|
Embed
Progress spinner
hollie
hollie

@jemostrom Oh wow, really? I'm so curious to try it again! When I view source on web pages now I barely recognize what's under the hood.

|
Embed
Progress spinner
jemostrom
jemostrom

@hollie 👍🏻😜

|
Embed
Progress spinner