Regular Expression Type in Eclipse MAT

What type of syntax does Regex support MAT? I assumed that it would be Java (although Java Regex isnt Regular per se), but it does not seem to work. I tried Perl and it did not work. I need Regex to filter the list in a MAT histogram. for example: Include arrays, but do not include char arrays. Exclude java.lang.String Include java.util.Collections. *

For arrays, just enter "[]" (without the quotes), and I can manually enter them, but I would like to do this at a time to automate the process.

+4
source share
1 answer

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

Regular expression filter to include strings

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

For example, "java.util", "java.lang", "char []"

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

Regular Expression Filter to Exclude Strings

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

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

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

+1
source

All Articles