r1241@thor:  alex | 2006-12-13 06:28:42 +0200
 Fixed: TESTNG-113 Dependent methods within the same static inner class are not found

diff --git a/CHANGES.txt b/CHANGES.txt
index 195f42b..bf02381 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 ===========================================================================
 5.5
 
+Fixed: TESTNG-113 Dependent methods within the same static inner class are not found
 Fixed: TESTNG-125 TestNG failed for test classes under *.java*.* pakages
 
 ===========================================================================
diff --git a/src/main/org/testng/internal/MethodHelper.java b/src/main/org/testng/internal/MethodHelper.java
index 86ef94f..3f012ce 100644
--- a/src/main/org/testng/internal/MethodHelper.java
+++ b/src/main/org/testng/internal/MethodHelper.java
@@ -144,9 +144,7 @@
     List<ITestNGMethod> vResult = new ArrayList<ITestNGMethod>();
     String currentRegexp = null;
     for (String fullyQualifiedRegexp : regexps) {
-//      int ind = fullyQualifiedRegexp.lastIndexOf(".");
-//      String regexp = ind >= 0 ? fullyQualifiedRegexp.substring(ind + 1) : fullyQualifiedRegexp;
-      String regexp = fullyQualifiedRegexp;
+      String regexp = escapeRegexp(fullyQualifiedRegexp);
       boolean foundAtLeastAMethod = false;
       if (regexp != null) {
         currentRegexp = regexp;
@@ -177,6 +175,13 @@
   }
 
   /**
+   * Escapes $ in regexps as it is not meant for end-line matching, but inner class matches.
+   */
+  private static String escapeRegexp(String regex) {
+    return regex.replace("$", "\\$");
+  }
+  
+  /**
    * Read the expected exceptions, if any (need to handle both the old and new
    * syntax
    */