vralfy / phpcsmd

Netbeans plugin to report code measurements generated by phpcs, phpmd, phpcpd and pdepend as Tasks and Annotations
27 stars 6 forks source link

malformed regex in Logger #8

Closed fonsecas72 closed 11 years ago

fonsecas72 commented 11 years ago

This is giving exception when installing (? - not confirmed) You are not using "-" corretly.

See: http://stackoverflow.com/questions/5260364/java-regexp-error-is-not-a-valid-character

And maybe you should remove this char too? I suggest that you take a closer look at the function that i post in Issue #2. This doesn't mean that you have to use that function but maybe its logic.

Logs are certainly important. When users configures this plugin logs are the only thing that they have to check what's working and what's not.

To fix this you may simple do:

.replaceAll("[^A-Za-z0-9\\.\\n\\r\\w\\\\\\/\\!\\$%&:,;\\(\\)=\\?\"'<>\\-\\*]", "&otimes;")

(I think...)

vralfy commented 11 years ago

fixed