Scripts provided here are typically Javascript so will likely not work if directly pasted into a Groovy script editor, some tweaking may be required.
import java.util.regex.Pattern; def pattern = Pattern.compile("([Gg])roovy") assert pattern.class == Pattern; print('pattern class: '+pattern.class); |
The following are scripts to solve some cases, may help you toward a solution, feel free to submit yours through support or comments!