Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2022, 02:14 AM
eduardb eduardb is offline Word macro for deleting a line that starts with a specific character + deleting the line before Windows 10 Word macro for deleting a line that starts with a specific character + deleting the line before Office 2019
Novice
Word macro for deleting a line that starts with a specific character + deleting the line before
 
Join Date: Aug 2022
Posts: 1
eduardb is on a distinguished road
Question Word macro for deleting a line that starts with a specific character + deleting the line before

Hello community,




I'm hoping someone could help me out. I'm trying to alter subtitle SRT files by only removing the text and getting rid of the timestamps and the numbering within them.



The timestamps part is rather easy, since I can Find/Replace them with the "00:[!^13]@^13" formula. However, every such timestamp also has a line before it that contains a number.



Example format:
1
00:00:01,380 --> 00:00:02,550
This is the text I only want to keep




I would like to be able to remove the timestamp line together with the line before it.



I haven't been able to find a decent solution online to this. I'm truly hoping someone could point me in the right direction here. Thanks!
Reply With Quote
  #2  
Old 08-10-2022, 03:17 AM
macropod's Avatar
macropod macropod is offline Word macro for deleting a line that starts with a specific character + deleting the line before Windows 10 Word macro for deleting a line that starts with a specific character + deleting the line before Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try a wildcard Find/Replace, where:
Find = [0-9]{1,}^13\00:[!^13]@^13
Replace = nothing
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro, remove lines, subtitle

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word macro for deleting a line that starts with a specific character + deleting the line before Document becomes frozen when deleting a line of text asparks Word 4 01-25-2018 01:08 PM
Word macro for deleting a line that starts with a specific character + deleting the line before Deleting only half/top of the line ? spookiepower Word 1 01-30-2014 11:18 PM
Word macro for deleting a line that starts with a specific character + deleting the line before Deleting A blank Line that has a specific heading style , word 2010 & 2013 SteveWcg Word 5 01-08-2014 10:37 PM
Word macro for deleting a line that starts with a specific character + deleting the line before Deleting a line DavidTheToad Word 1 11-24-2013 08:12 AM
Word macro for deleting a line that starts with a specific character + deleting the line before Style Replaced When Deleting a Line WordHostage Word 2 11-26-2011 11:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft