20 lines
438 B
C#
20 lines
438 B
C#
|
using System.Text.RegularExpressions;
|
||
|
|
||
|
namespace AutoMFA.Test;
|
||
|
|
||
|
public partial class RegexTests
|
||
|
{
|
||
|
[Fact]
|
||
|
public void MBankRegex()
|
||
|
{
|
||
|
var msg = "58 PLN haslo: 21372137 mBank";
|
||
|
var match = mBank().Match(msg);
|
||
|
|
||
|
Assert.True(match.Success);
|
||
|
Assert.Equal("21372137", match.Groups[1].Value);
|
||
|
}
|
||
|
|
||
|
[GeneratedRegex("haslo: (\\d{8})")]
|
||
|
private static partial Regex mBank();
|
||
|
}
|