« Return to Thread: How to clean up results in Matcher Class?

How to clean up results in Matcher Class?

by Harsha1 :: Rate this Message:

Reply to Author | View in Thread

Hi,
I have to clear the result from the Matcher class which gets generated after =~
I have code like this...

                int i = 0
                def sent = 'Hall Of Fame'
                if(sent =~ "([^\\s]+\\s[^\\s]+\\s[^\\s]+)")
                {
                       /* HERE I NEED TO CLEAR THE RESULT, Which is thr in Matcher class */
                       
                        sent =~ "([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)"
                       
                        println Matcher.lastMatcher[0][1]
                        println Matcher.lastMatcher[0][2]
                        println Matcher.lastMatcher[0][3]
                }

 « Return to Thread: How to clean up results in Matcher Class?