Home > Software design >  Syntax for class filter patterns
Syntax for class filter patterns

Time:12-09

I don't understand the syntax of the patterns used in IntelliJ IDEA's menu Run | View Breakpoints... | Catch class filter | Include | Add pattern... and probably many other places in the IDE.

Why does the pattern com.myname.*Tests not match com.myname.mypackage.Tests?

Include pattern Is com.mypackage.Tests included?
com.myname.mypackage.Tests true
com.myname.* true
*Tests true
com.myname.*Tests false

Note that I also unsuccessfully tried:

  • com.myname.**.Tests
  • com.myname.*.Tests
  • com.myname..*.Tests
  • com.myname.**.*.Tests

CodePudding user response:

Unfortunately this is not clear from the UI or documentation:

* in the middle is not supported. Regular expressions here are limited to exact matches and patterns that begin with * or end with *, for example, *.Foo or java.*.

  • Related