2 Replies Latest reply on Jan 9, 2008 1:02 PM by 807603

    String method to return subString based on "tags"


      Is there a simple method of String or another class which will do the following:
      String myStr = "Hello this a string with [myTag] and I want just this bit [/myTag]";
      String subStr = myStr.someMethod("[myTag]" ,"[/myTag]").toString();
      giving subStr = " and I want just this bit "

      In other words rather than the String.subString(int x, int y) method which does the above but based on char indexes is there a method which will do it based on text...

      I realize this is kinda like XML parsing but don't want to go down that route.

      Thanks in advance...