JSFiddle - React, Tailwind, and code Playground

by krish

HTML

<input type="button" value="process" onclick="evalPass();"/>
<script type="text/javascript" language="Javascript">
function evalPass() {
    var done = false;
    var ans = "Aaaa0"
    var reg = new RegExp("^[A-Za-z0-9]{5}");
    var exec_ = reg.exec("Aaaa0");
    if (exec_ != null) {
        alert("passed first if");
        reg = new RegExp("^[^e-z0-9A-Z]+[^A-Z]{4}{?[a-z]*_?");
        exec_ = reg.exec("abcd0abc{a_");
        if (exec_ != null) {
    alert("Passed 2nd if");
            reg = new RegExp("^[A9FbdHh5]+[T]*.{2}_?[a-z]+");
            exec_ = reg.exec(ans);
            if (exec_ != null) {
    alert("Passed 3rd if");
                reg = new RegExp("^[^YdSeu][r]+[^r]+=?_?[aeiou]+[^pstuvwxyz]+");
                exec_ = reg.exec("Ar+s+aeiou");
                if (exec_ != null) {
   alert("Passed 4th if");
                    reg = new RegExp("^(c|a|b|d)+[^A-Za-df-qs-z]{2}{?[^vCXBhq]*[^pqrst]*[a]+[^passwd]*}?");
                    exec_ = reg.exec(ans);
                    if (exec_ != null) {
    alert("Passed 5th if");
                        reg = new RegExp("^.*[k0pst]");
                        exec_ = reg.exec("Kk0pst");
                        if (exec_ != null) {
    alert("Passed 6th if");
                            reg = new RegExp("^[^0-9A-Z]{5}$");
                            exec_ = reg.exec(ans);
                            if (exec_ != null) {
    alert("Passed 7th if");
                                var url = exec_[0];
                                if (url == ans) {
    alert("ur done");
                                    alert('Good Job, enter that as the mission password');
                                    done = true;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if (done == false)
    {
        alert('Sorry, wrong password');
    }
}
</script>

CSS

{?[a-z]*_?