SourceMgr Diagnostic Verifier Handler Regex error

Hi all,
I am writing error expected test in my compiler built on mlir.
The error message is " ‘XXXOP’ generates input0 IllegalStencil2dPadH: illegal pad H".
And I write an expected diagnostic in regex form:
" expected-error-re@below {{illegal pad {{.*}}}} "
When I run my compiler with command line arg “–verify-diagnostics”, it seems like the expected diagnostic dose not match any error, the “unexpected error” still exist.

Is there anything wrong with my code?

The example in here can not execute correctly as well.

the input test.mlir is:

func.func @foo() -> i32 { // expected-error-re@+1 {{'func.return' op has 0 operands, but enclosing function (@{{.*}}) returns 1}} return }

the command line args is:

mlir-opt -verify-diagnostics ./test.mlir

the output error is:

Sorry, it’s my fault. We use the mlir version which dose not support the regex form matching.