package de.duehl.threads;

/*
 * Copyright 2016 Christian Dühl. All rights reserved.
 *
 * This program is free software. You can redistribute it and/or
 * modify it under the same terms as perl:
 *
 * general:  http://dev.perl.org/licenses/
 * GPL:      http://dev.perl.org/licenses/gpl1.html
 * artistic: http://dev.perl.org/licenses/artistic.html
 */

public class VeryLongRegExpRunnable extends ARunnable implements Runnable {

    @Override
    protected void tryToRun() throws InterruptedException {
        System.out.println("- VeryLongRegExpRunnable gestartet");
        String regExp = "a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*b";
        String search = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
        if (search.matches(regExp)) {
            System.out.println("Matcht");
        }
        else {
            System.out.println("Matcht nicht");
        }
        System.out.println("- VeryLongRegExpRunnable beendet");
    }

}
