Time is presented in document as "459 PM"
It is read as "four hundred fifty-nine PM".
I need for it to be read as "four fifty-nine PM". This obviously needs to be for any time in either three or four digit format and I have beat my head against the proverbial wall and not been successful.
Guidance appreciated, please.
regex or mask help
Moderator: Jim Bretti
-
- Posts: 1558
- Joined: Wed Oct 29, 2003 11:07 am
- Contact:
Re: regex or mask help
One way to do this is with an expression that looks for three digits followed by a space, then am or pm. Then respell the match, inserting a space between the first and second digit.
Give this a try:
Regular Expression:
(\d)(\d\d)(?=\s(A|P)M)
Respell:
$1 $2
There is a very good regular expression reference at https://www.regular-expressions.info/ if you need help with regular expressions
Give this a try:
Regular Expression:
(\d)(\d\d)(?=\s(A|P)M)
Respell:
$1 $2
There is a very good regular expression reference at https://www.regular-expressions.info/ if you need help with regular expressions
Jim Bretti
NextUp.com
NextUp.com