<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Regex tester" scrolling="true" author="Baarr" author_email="robertvandenbaar@gmail.com" height="300" width="260" thumbnail="http://img338.imageshack.us/img338/4199/regexk.png" screenshot="http://img338.imageshack.us/img338/4199/regexk.png" description="Test your regular expressions">
</ModulePrefs>
<Content type="html">
<![CDATA[
<div id="search" style="background:#FFF url('http://img295.imageshack.us/img295/3403/regex.png') no-repeat;min-height:200px;width:300px">
<div id="align" style="padding: 60px 0 0 22px;">
<script language="javascript">
	function doMatch()  
	{
		try
		{
			var re = new RegExp(document.match.regex.value);
		}
		catch(e)
		{
			document.getElementById('notify').innerHTML = 'Ongeldige reguliere expressie';
		}
		
		if(re)
		{
			document.getElementById('notify').innerHTML = '';
			
			if(document.match.subject.value.match(re)) 
			{
				document.getElementById('subject').style.backgroundColor="green";
			} 
			else 
			{
				document.getElementById('subject').style.backgroundColor="red";
			}
		}
		
		
	}
</script>
<form id="match" name="match" method=post action="javascript:void(0)">
	<table border="0"  style="font-family:Arial;font-size:12px;">
		<tr>
			<td>REGEX</td>
		</tr>
		<tr>
			<td><input style="border:1px solid #222; width:146px;" onkeyup="doMatch();" type=text name="regex" value="^[a-z]+$" size="30"></td>
		</tr>
		<tr>
			<td>SUBJECT</td>
		</tr>
		<tr>
			<td><input style="border:1px solid #222; width:146px;background-color:green;" onkeyup="doMatch();" type=text id="subject" name="subject" value="regex" size="30"></td>
		<tr>
		<tr>
			<td colspan="2" style="text-align:center;font-size:20px;color:#FF0000"><div id="notify"></div>
		</tr>
	</table>
 </form>
</div>
</div>
<div style="margin:10px">
<script type="text/javascript"><!--
google_ad_client = "pub-1593761573138123";
/* regex */
google_ad_slot = "4796042424";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
]]>
</Content>
</Module>
