Python Forum
re.search and datetime not printing as expected
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
re.search and datetime not printing as expected
#3
yes, I have corrected the .time thank you for reply however regarding the am pm the only format is see is for am and pm with out the dots not like a.m. dot p.m.

also I have one more question say I want to search for time in a text in general there is a couple different ways the time would be displayed when using a speech recognizer for example if you say 10:00 am it will print 10 a.m. or if i say 1:07 pm it prints 1:07 p.m. the problem with searching for time with how i have it set up now is there are 4 different ways it could be searched.

example:
1 p.m.
1:07 p.m.
10 p.m.
10:07 p.m.

I'm referring to how the parameters of the re.search and how they are searching for time in text. I've tired using if statements for all of the different ways it could be written but this lead to two problems the code being over complicated and it throwing error codes do you have any idea?
Reply


Messages In This Thread
RE: re.search and datetime not printing as expected - by Nickd12 - Oct-20-2020, 11:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search Results Web results Printing the number of days in a given month and year afefDXCTN 1 2,355 Aug-21-2020, 12:20 PM
Last Post: DeaD_EyE
  TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str' findbikash 2 9,890 Sep-18-2019, 08:32 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020