I need something automated like:
From this (courtesy: Revolution OS):
0
00:00:04,180 → 00:00:05,700
I was at Agenda 2000
1
00:00:06,300 → 00:00:09,100
and uh, one of the people who was there
was Craig Mundie,
2
00:00:09,100 → 00:00:12,180
who is some kind of
high mucky muck at Microsoft,
3
00:00:12,700 → 00:00:16,180
I think uh, vice-president of consumer products
or something like that.
and so on…
To this:
I was at Agenda 2000, and uh, one of the people who was there was Craig Mundie, who is some kind of high mucky muck at Microsoft, I think uh, vice-president of consumer products or something like that.
…
and so on for hundreds of lines.
For this, I have to first remove the counts from 0,1,2, … , which I did using ^[0-9]*$
Then I want to remove the time-period, e.g., 00:00:12,700 → 00:00:16,180 , and so on.
I tried with 0[0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9] → 0[0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]$ and could of course remove them, but that is too particular, and not at all general.
What would the most general of codes, with the least possible no. characters using regular expressions, to remove the time-periods using Find-Replace?
RESPONSE TO RPR's POST BELOW
Hello, rpr!
Is further brevity possible? Without counting the places?
The concerned help was referred to. Not sequential.
Assume there are these following link patterns:
" target="_blank">Argentina</a></
" target="_blank">Austria</a></
" target="_blank">Belgium</a></
" target="_blank">Bolivia</a></
...
" target="_blank">Costa Rica</a></
" target="_blank">Czech Republic</a></
...
and so on.
I can remove these by using:
" target="_blank">[A-Z .]*</a></
or
" target="_blank">[A-Z. ]*</a></
But why not " target="_blank">*</a></
simply ?
And how do I replace empty paragraph mark, i.e., ¶ ?
In your case, why not ^[0-9:,*->]*[0-9:,*]*$ instead of ^[0-9:,]{12} → [0-9:,]{12}$ ?
And thank you! I thought I wouldn’t receive any response this time
To RPR: From: bkpsusmitaa At 17:34 IST (+5:30 Hrs. UST)
Thank you for your extensive and elaborate reply. Your understanding of the issue is admired. So I have to use judiciousness, on a case by case basis, the regex I need to use to get the desired output.
And regarding empty strings to replace ^$, what is that? I don’t know. Is it blank in the Find (sorry: would be Replace) field?
In the meanwhile, my regards for your support.
[Reply to RPR at 08:03 Hrs. IST +5:30 UST]
Yes, I now understand your statement “with empty string”. I got confused unduly
I write a file with garbage strings, just for testing.
dfssddf
otte
adiojrr
rtjewup
and save the file as test.odt. Then I run the ^$ Find-Replace with the replace field blank.
Thank you for your post. I really appreciate your kind disposition.
In the meanwhile, please find time to test the issue: target="_blank">*</a></
populating a blank ODT file with the strings given.
Reply to RPR at 07:33 IST on 10th August 2015
Yes, I understood. Thank you. Actually, coming from MSoffice which was the office software used by government offices, I had difficulty to assimilate the differences between the MSO and the LibO. I am still learning. Old Habits Die Hard
Thank you once more. Time to close this thread. I hope this thread will help people in time to come.