I have a question about changing the string to a regular expression.
"It's seven. 12, 2016" String
"December 7, 2016"
How do I change to? I'm going to use re.sub function and I'm wondering how to make a regular expression.
Simply, I think you can match the part with the numbers.
import re message = "7. 12, 2016" m = re.sub(r)(\d+).\s+(\d+),\s+(\d+)",r"\3year\February \1",message) print(m)
Other
537 Unable to install versioned in Google Colab
550 Scrap text information after the "View More" button when searching in the Yahoo! News search window
516 The method of the class of the application that I am creating in Typescript does not work as I expected.
969 In Java servlet, when SHA-256 sends WW-Authenticate header for digest authentication, the client does not return the result.
603 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
© 2024 OneMinuteCode. All rights reserved.