Regex in pattern text in NodaTime

17 views
Skip to first unread message

Senthil Nathan

unread,
Jul 25, 2022, 12:46:39 PM7/25/22
to noda...@googlegroups.com
Hi All,

I am using NodaTime nuget package. Is it possible to use regex or pass multiple values for patterntext in CreateWithInvariantCulture method?

Thanks,
Senthil

Jon Skeet

unread,
Jul 25, 2022, 5:04:12 PM7/25/22
to Noda Time
(As a heads-up, this is the kind of question that would be usefully asked on Stack Overflow - it's then more easily accessible to others in the same situation.)

You can only specify one format string per "regular" pattern, but you can use CompositePatternBuilder<T> to combine multiple patterns into one that will be parse each of the original patterns until it finds one that is able to parse the text you provide.

Jon
Reply all
Reply to author
Forward
0 new messages