5

What type of Regex syntax does MAT support? I assumed it would be Java's (though Java's Regex isnt Regular per se) but it didn't seem to work.. I tried Perl's and it didn't work. I need Regex's to filter out the list in MAT's Histogram. eg: Include arrays but exclude char arrays. Exclude java.lang.String Include java.util.Collections.*

For arrays just typing in "[]" (without quotes) works and I could manually type each one in but I'd like to do it in one go to automate the process.

trincot
  • 317,000
  • 35
  • 244
  • 286
vmhacker
  • 413
  • 4
  • 7

1 Answers1

2

Here's the Regex that you can use to include and exclude multiple Strings in the Eclipse MAT histogram filter.

Regex filter to include Strings

.*STRING1.*|.*STRING2.*|.*STRING3.*

Example include "java.util", "java.lang", "char[]"

.*java.util.*|.*java.lang.*|.*char\[\].*

Regex filter to exclude Strings

^(?!.*STRING1|.*STRING2|.*STRING3).*$

Example exclude "java.util", "java.lang", "char[]"

^(?!.*java.util|.*java.lang|.*char\[\]).*$

Peter Tarlos
  • 731
  • 10
  • 13