diff --git a/src/checkstyle/Checker.hx b/src/checkstyle/Checker.hx index 0ab5300c..a1ec9ebc 100644 --- a/src/checkstyle/Checker.hx +++ b/src/checkstyle/Checker.hx @@ -282,10 +282,11 @@ class Checker { var cls = file.name.substring(0, file.name.indexOf(".hx")); if (excludesForCheck.contains(cls)) return true; - cls = cls.replace("/", ":"); + var slashes:EReg = ~/[\/\\]/g; + cls = slashes.replace(cls, ":"); for (exclude in excludesForCheck) { - var regStr:String = exclude + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$"; - var r = new EReg(regStr.replace("/", ":"), "i"); + var regStr:String = slashes.replace(exclude, ":") + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$"; + var r = new EReg(regStr, "i"); if (r.match(cls)) return true; } return false;