Capture only part of regex match with optional groups in python
I’m trying to convert a duration string like "2d1h30s"
to a total number of seconds. I’ve been using the re
package with the following regex:
I’m trying to convert a duration string like "2d1h30s"
to a total number of seconds. I’ve been using the re
package with the following regex: