如果格式是固定的,参考
Dim pattern As String = "[0-9]{2}月[0-9]{2}日[0-9]{2}时[0-9]{2}分"
Dim txt = "04月09日07时50分至04月09日05时50分为上班时间,上班需要满足8h。"
Dim rgx = New System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For Each match As System.Text.RegularExpressions.Match In rgx.Matches(txt)
Output.Show(match.Value)
Next
pattern = "[0-9]h"
rgx = New System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For Each match As System.Text.RegularExpressions.Match In rgx.Matches(txt)
Output.Show(match.Value)
Next