SyntaxFix
Write A Post
Hire A Developer
Questions
Another variant is
Assert.assertThat(actual, new Matches(expectedRegex));
Moreover in org.mockito.internal.matchers there are some other interesting matchers, like StartWith, Contains etc.
org.mockito.internal.matchers
StartWith
Contains