You need to sign in to do that
Don't have an account?
DrawloopSupport
Loop through regex matches
How would one go about looping through all of the matches in a Matcher object? Most of the apex documentation says things like "from the previous match" but I can't even tell how to move between the matches (like previous and next match). Can anyone point me in the right direction, or better yet, post a sample?
Thanks!
Figured this out:
Pattern p = Pattern.compile('regex'); Matcher mo = p.matcher('string'); while (mo.find()) { System.debug(mo.group()); }