anchor.diff:  	set category = "Special Verbs"
   	set name = "Pretty Filters - Add Pattern"
   
  +	var/text = "Test text"
  +	var/list/parts = text2list(line, "=")
  +	var/pattern = parts[1]
  +	var/replacement = ""
  +	if(parts.len >= 2)
  +		var/index = 2
  +		for(index = 2; index <= parts.len; index++)
  +			replacement += parts[index]
  +			if(index < parts.len)
  +				replacement += "="
  +
  +	var/regex/R = new("~[pattern]~[replacement]~i")
  +	var/newtxt = R.Replace(text)
  +	if(text == newtxt)
  +		src << "\"[line]\" was not added because it does not compile. It may be that you are using regular expression special characters and do not realise. For example, ( and ). Please review this guide: http://lummoxjr.byondhome.com/byond/regex.html#a"
  +		return
  +
   	if(add_pretty_filter_line(line))
   		usr << "\"[line]\" was added for this round - It has not been added to the permanent file."
   	else
  
positive.code: 				if(index < parts.len)
  					replacement += "="
  
  		var/regex/R = new("~[pattern]~[replacement]~i")
  		var/newtxt = R.Replace(text)
  		while(newtxt)
  			text = newtxt
  			newtxt = R.ReplaceNext(text)
  
  	return text
  
  
negative.code: 	var/list/filter_lines = file2list(path)
  
  	for(var/line in filter_lines)
  		var/text = "Test text"
  		var/list/parts = text2list(line, "=")
  		var/pattern = parts[1]
  		var/replacement = ""
  		if(parts.len >= 2)
  			var/index = 2
  			for(index = 2; index <= parts.len; index++)
  				replacement += parts[index]
  				if(index < parts.len)
  					replacement += "="
  
  		var/expression = "~[pattern]~[replacement]~i"
  		var/regex/R = new(expression)
  		var/newtxt = R.Replace(text)
  		if(text == newtxt)
  			message_admins("<span class='admin'>The pattern \"[expression]\" failed to compile. It will be removed from the list of OOC filters. If this was added to the config file, please delete it or fix it.</span>");
  			filter_lines -= line
  			continue
  
  		if(!add_pretty_filter_line(line))
  			continue
  
  