Delete everything except the lines of text..? (GREP)

47 views
Skip to first unread message

Andy Nickless

unread,
Nov 23, 2022, 1:00:57 PM11/23/22
to BBEdit Talk
I'm new to BBEdit. I have the 14 Pro version, and I have to say, so far, it's unbelievably good.
I'm beginning to get results with very simple GREP that I only dreamed about, but I don't find it easy. I have the User Manual pdf but I find parts of it confusing and a little vague (for a beginner).

My latest challenge is to remove everything except full content of the text lines in a WEBVTT (.vtt) file. In other words, including all punctuation etc. Each sentence on its own line.
(It's for a video about training sheep herding dogs).

If someone could kindly suggest what I need to isolate the text in this short example, that would be great. (I need to do it with around 75 files).
____________________________

WEBVTT

1
00:00:00,240 --> 00:00:02,240
Max would 'Grip for England"!

2
00:01:41,560 --> 00:01:43,560
Max goes straight to work, bringing all 10 sheep to the handler.

3
00:02:01,719 --> 00:02:03,719
He's bringing them too fast, do you think he will stop?

4
00:02:06,599 --> 00:02:08,599
Watch how Max naturally starts circling around the sheep.

_____________________________

If I get a result, I'll be sure to study it, and build my own next time!
Thanks in anticipation!
Andy

Kaveh

unread,
Nov 23, 2022, 1:11:22 PM11/23/22
to bbe...@googlegroups.com
Try this "text factory". See comments. Choose options and files you want to modify.

I suggest you open all files you want to change, automatically modify and save to disk.

Fingers crossed.

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/53c84111-3cb9-4528-b6e3-41ca0e74dc7cn%40googlegroups.com.


--
Kaveh Bazargan PhD
Director
River Valley Technologies ● Twitter ● LinkedIn ● ORCID ● @kave...@mastodon.social
Accelerating the Communication of Research
sheep.textfactory

Andy Nickless

unread,
Nov 23, 2022, 1:44:26 PM11/23/22
to BBEdit Talk
Thank you Kaveh!
That was super-quick!
I'd never heard of Text Factory before, so I'm going to have a good look at it tomorrow!
Thanks again for your help!
Andy

Kaveh

unread,
Nov 23, 2022, 1:46:44 PM11/23/22
to bbe...@googlegroups.com
I only started using text factory recently. Very useful. Good luck and let me know any problems. :-)

Regards
Kaveh

Andy Nickless

unread,
Nov 24, 2022, 3:17:58 AM11/24/22
to BBEdit Talk
Thank you again, Kaveh - that worked perfectly - and I was able to work out why it worked, so that's a bonus!
Best wishes,
Andy

Kaveh

unread,
Nov 24, 2022, 3:35:28 AM11/24/22
to bbe...@googlegroups.com
Bill in the post. 🤣🤣

--
Sent from MetroMail
Reply all
Reply to author
Forward
0 new messages