Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: How to deal with timestamps? #30186
    WmMitchell
    Participant

    Thank you! The thread responses just brought it home to me that I should handle it one thing at a time, as this is quite tricky and I’m not that good with regexp.

    Yikes, the comment above regarding the “100 minutes” reminded me that, though rare, I do save transcripts for longer videos (conferences and the odd long tutorial) that are well over 100m, being over 2 hours and above!

    So the first code (with or without the ^ symbol) :

    document.selection.StartOfDocument(false);
    document.selection.Replace("^0:","00:",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
    document.selection.StartOfDocument(false);
    

    produced this type of listing (after I’d run the tabs macro):

    00:24	organizing transformations thank you
    00:35	[Music] thank you
    3:14	they tend to pile till later and they leave out all their favorite things they're always on the go and my client
    14:20	you're not using it one time a week it's going to be real you have a ton of storage you don't know I don't feel like
    38:48	really maximize the vertical space so I got a lot of different sizes I'm lining them up in the driveway so I can sort
    1:02:46	letting go was all they needed to make a really big change

    And the “corrected” code of:

    document.selection.StartOfDocument(false);
    document.selection.Replace("^(?=\\d:)","0",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
    document.selection.StartOfDocument(false);

    yielded this:

    00:24	organizing transformations thank you
    00:35	[Music] thank you
    03:14	they tend to pile till later and they leave out all their favorite things they're always on the go and my client
    14:20	you're not using it one time a week it's going to be real you have a ton of storage you don't know I don't feel like
    38:48	really maximize the vertical space so I got a lot of different sizes I'm lining them up in the driveway so I can sort
    01:02:46	letting go was all they needed to make a really big change

    So good for all time stamps starting with a zero, but doesn’t cover the ones beginning with 1-5 (1m-59m, and I imagine, 2 or 3.

    If we can take care of this time format issue first, the rest should be easier (hoping).
    Example timestamps:

    0:24	organizing transformations thank you
    0:35	[Music] thank you
    3:14	they tend to pile till later and they leave out all their favorite things they're always on the go and my client
    14:20	you're not using it one time a week it's going to be real you have a ton of storage you don't know I don't feel like
    38:48	really maximize the vertical space so I got a lot of different sizes I'm lining them up in the driveway so I can sort
    1:02:46	letting go was all they needed to make a really big change
    2:03:33 ...
    3:09:12 ...

    Thank you!!

    in reply to: Remove space between a number and a fraction … #7800
    WmMitchell
    Participant

    Extended version:

    Find:
    ([0-9]+) ([¼,½,¾])
    Replace with:
    12

    That is amazing! I really thought that was going to work. It’s very confusing to be dealing with a whole bunch of software applications, but I seem to remember using something similar a long time ago in Word and it works in Word. But, unfortunately, it didn’t work here.

    I really liked the extended version since it would take care of all number-fraction combinations, but the 1 and 2 didn’t work as expected in EmEditor.

    When I ran the macro, which looks like this:
    document.selection.Replace(“([0-9]+) ([¼,½,¾])”,”12″,eeFindNext | eeReplaceAll | eeFindReplaceRegExp); /* Remove space between number & fraction.*/

    I get those funny little boxes come up in the editor:
    [ ] [ ]
    rather than, say, 1½.

    We’re close (“we”??!! I mean, obviously, you), but this isn’t quite right. Can you suggest how to fix? The 1 and 2 should put the number and fraction back that was there before, instead it’s replacing it with little boxes. (?)

    Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)