REGEX "Problem"
Posted: 02 Jun 2013 16:49
I have a script in another editor that I want to get away from, if I can and use RJ Text Ed. But the "deal breaker" is if I can get it to do some conversion.
Say I have this (US dates MM/DD/YYYY):
USER1234 (06/21/2012 02:34:59 PM EST)
XYZ1 (06/21/2012 03:38:14 PM EST)
ABCD (06/22/2012 06:45:05 AM EST)
What I want to do, is for the lines to become:
USER1234 (2012_06_21 1434:59 HOURS ET)
XYZ1 (2012_06_21 1538:14 HOURS ET)
ABCD (2012_06_21 0645:05 HOURS ET)
Just a sampling of the code that works in the other editor is:
UltraEdit.activeDocument.findReplace.replace("^([01][0-9]^)/^([0-3][0-9]^)/^([12][0-9]+^) 04:^([0-5][0-9]:[0-6][0-9]^) PM E[DS]++T", "(^3_^1_^2 16^4 ET)");
No matter what I've tried, and I've tried it for three days, I can't get any REGEX commands to work in RJ Tex Ed. Can anyone help me, PLEASE! This is the only section of the script I've worked on, with no success.
I WOULD PREFER C++ script, but JScript would be acceptable.
Thanks in advance!
Say I have this (US dates MM/DD/YYYY):
USER1234 (06/21/2012 02:34:59 PM EST)
XYZ1 (06/21/2012 03:38:14 PM EST)
ABCD (06/22/2012 06:45:05 AM EST)
What I want to do, is for the lines to become:
USER1234 (2012_06_21 1434:59 HOURS ET)
XYZ1 (2012_06_21 1538:14 HOURS ET)
ABCD (2012_06_21 0645:05 HOURS ET)
Just a sampling of the code that works in the other editor is:
UltraEdit.activeDocument.findReplace.replace("^([01][0-9]^)/^([0-3][0-9]^)/^([12][0-9]+^) 04:^([0-5][0-9]:[0-6][0-9]^) PM E[DS]++T", "(^3_^1_^2 16^4 ET)");
No matter what I've tried, and I've tried it for three days, I can't get any REGEX commands to work in RJ Tex Ed. Can anyone help me, PLEASE! This is the only section of the script I've worked on, with no success.
I WOULD PREFER C++ script, but JScript would be acceptable.
Thanks in advance!