Regular Expressions in Max/MSP

Here’s a tutorial patch explaining how to use regular expressions with the [regexp] object in Max to parse text. It shows a few different techniques and includes examples of each. The code is below in JSON format so Max4 users can convert it and take a look too. Copy it into a new window, switch out of edit mode and click the titles to view them one by one. There are quite a few more complicated things you can ask regular expressions to do and if I ever find repeated uses for them I will try to add these topics to the file as well.

{
	"boxes" : [ 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p references",
				"hidden" : 1,
				"id" : "obj-22",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 182.0, 169.0, 77.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 283.0, 44.0, 612.0, 651.0 ],
					"bglocked" : 0,
					"defrect" : [ 283.0, 44.0, 612.0, 651.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "to the html example used above, the name I have used is \"tagtype\".",
								"id" : "obj-51",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 520.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<title>hello</title>",
								"id" : "obj-45",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 546.0, 105.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<b>bold</b>",
								"id" : "obj-47",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 546.0, 78.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp <(?P<tagtype>[^>]+)>.*?</(?P=tagtype)>",
								"id" : "obj-49",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 572.0, 269.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "(?P<name>expression) and to refer to one it is (?P=name). The expression below is equivalent",
								"id" : "obj-40",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 507.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "number when you include a lot of references. To set a name the syntax is",
								"id" : "obj-39",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 494.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "You can refer to a backreference by a specified name, which can be easier than remembering a ",
								"id" : "obj-38",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 481.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "tint",
								"id" : "obj-37",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 429.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "tint",
								"id" : "obj-35",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 429.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "in",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 143.0, 429.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "in",
								"id" : "obj-46",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 429.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp (t)?in\\\\1",
								"id" : "obj-44",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 143.0, 455.0, 92.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp (t?)in\\\\1",
								"id" : "obj-43",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 455.0, 91.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "backreference fails to match at all.",
								"id" : "obj-33",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 403.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "that is referenced is optional. However the second example will not return anything because the",
								"id" : "obj-32",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 390.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : " ? and * repetition metacharacters. The first example below will match \"in\" because the character",
								"id" : "obj-31",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 377.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Backreferences can capture empty matches, which is something to be aware of when using the",
								"id" : "obj-30",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 364.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "happens to the last two messages.",
								"id" : "obj-27",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 286.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "i am amused",
								"id" : "obj-26",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 312.0, 80.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "hit it higher",
								"id" : "obj-25",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 130.0, 312.0, 69.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "i like like apples",
								"id" : "obj-16",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 312.0, 95.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp \\\\b(\\\\w+)\\\\s\\\\1\\\\b @substitute %1",
								"id" : "obj-20",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 338.0, 221.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "to remove repeated words. Try removing each of the word boundary anchors and watch what",
								"id" : "obj-24",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 273.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "And finally here is an example that uses backreferences in the expression and substitution string",
								"id" : "obj-21",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 260.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<title>hello</title>",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 208.0, 105.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<b>bold</b>",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 208.0, 78.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp <([^>]+)>.*?</\\\\1>",
								"id" : "obj-19",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 234.0, 144.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "triangle brackets is reused inside the second set to form the closing tag.",
								"id" : "obj-18",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 182.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Here the backreference is used to match any html tags. The string contained by the first set of",
								"id" : "obj-17",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 169.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "substitution to reverse the order of a name.",
								"id" : "obj-14",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 91.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "double backslash within the expression. Here is an example using the backreferenced parts in a ",
								"id" : "obj-13",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "number counting from left to right, preceeded by a percent sign in a substitution string or by a",
								"id" : "obj-12",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "boris ivanovich",
								"id" : "obj-41",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 117.0, 90.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp (\\\\w+)\\\\s(\\\\w+) @substitute \"%2, %1\"",
								"id" : "obj-42",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 143.0, 244.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "reused elsewhere, either during the match or afterwards in substitutions. They are refered to by",
								"id" : "obj-1",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print References",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 611.0, 99.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Parentheses are used to create a backreference to part of your expression which can then be ",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "References:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 78.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-49", 1 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-19", 1 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-16", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-25", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-26", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-20", 0 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-41", 0 ],
								"destination" : [ "obj-42", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-42", 0 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-15", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-10", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-35", 0 ],
								"destination" : [ "obj-43", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-46", 0 ],
								"destination" : [ "obj-43", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-43", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-44", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-48", 0 ],
								"destination" : [ "obj-44", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-37", 0 ],
								"destination" : [ "obj-44", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-47", 0 ],
								"destination" : [ "obj-49", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-45", 0 ],
								"destination" : [ "obj-49", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "References",
				"id" : "obj-19",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 182.0, 92.0, 72.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p repetition",
				"hidden" : 1,
				"id" : "obj-18",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 104.0, 169.0, 70.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 436.0, 44.0, 612.0, 565.0 ],
					"bglocked" : 0,
					"defrect" : [ 436.0, 44.0, 612.0, 565.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "non-greedy question mark after all types of repeptition metacharacter.",
								"id" : "obj-61",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 429.0, 519.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "useful when the input is very long or many strings are being analysed in succession.",
								"id" : "obj-58",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 494.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "-a.bcde",
								"id" : "obj-57",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 169.0, 182.0, 51.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "reduce the amount of parsing and backtracking that has to be done which can be particularly",
								"id" : "obj-55",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 481.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "negated character class, looking for anything but the closing triangle bracket, and this will",
								"id" : "obj-54",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 468.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "The third example shows a more efficient way of achieving the same result. We can use a ",
								"id" : "obj-53",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 455.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "non-greedy which means the plus will return as few matches as possible. You can use the",
								"id" : "obj-51",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 416.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "In the second example you will notice the question mark after the plus. This makes the repetition",
								"id" : "obj-50",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 403.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "will then return the match.",
								"id" : "obj-49",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 377.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "string does it backtrack to find the closing triangle bracket, which it does, the last character. It",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 364.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "In the first example the dot matches every character, only when it reaches the end of the input",
								"id" : "obj-47",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 351.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<b>bold</b>",
								"id" : "obj-44",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 299.0, 78.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<b>bold</b>",
								"id" : "obj-43",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 299.0, 78.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp <[^>]+>",
								"id" : "obj-14",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 325.0, 91.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp <.+?>",
								"id" : "obj-40",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 325.0, 82.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "<b>bold</b>",
								"id" : "obj-41",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 299.0, 78.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp <.+>",
								"id" : "obj-42",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 325.0, 75.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "expression matches. It is probably best explained with an example.",
								"id" : "obj-37",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 273.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "when the final match fails will it backtrack through the preceeding characters until the whole",
								"id" : "obj-36",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 260.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "This means that it will keep trying every character in order and continue if a match is found, only ",
								"id" : "obj-35",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 247.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "When dealing with repeated matches you need to be aware that the regexp object is greedy.",
								"id" : "obj-34",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 234.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp -?\\\\d+.?\\\\d*",
								"id" : "obj-31",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 208.0, 110.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "flonum",
								"id" : "obj-17",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 91.0, 182.0, 68.0, 20.0 ],
								"outlettype" : [ "float", "bang" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "number",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 182.0, 50.0, 20.0 ],
								"outlettype" : [ "int", "bang" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "+ matches 1 or more times, equivalent to {1\\,}",
								"id" : "obj-13",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 156.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "* matches 0 or more times, equivalent to {0\\,}",
								"id" : "obj-12",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 143.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "? matches 0 or 1 times, equivalent to {0\\,1}",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 130.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "metacharacters available to use as well. The regexp below shows them all in use.",
								"id" : "obj-9",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 104.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "do not include the final integer the maximum limit is infinite. There are three repetition",
								"id" : "obj-7",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 91.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "be escaped with a backslash and the maximum value must be greater than the minimum. If you",
								"id" : "obj-1",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "You can also specify a range of possible repetitions such as {3\\,6} note that the comma has to ",
								"id" : "obj-4",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "would put {n} after the character you want to be repeated where n is the number of occurences.",
								"id" : "obj-29",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Repetition",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 520.0, 91.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "You can specify that a character or string of characters occurs more than once. To do this you ",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 520.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Repetition:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 78.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-15", 0 ],
								"destination" : [ "obj-31", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-17", 0 ],
								"destination" : [ "obj-31", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-31", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-41", 0 ],
								"destination" : [ "obj-42", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-42", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-40", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-14", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-43", 0 ],
								"destination" : [ "obj-40", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-44", 0 ],
								"destination" : [ "obj-14", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-57", 0 ],
								"destination" : [ "obj-31", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Repetition",
				"id" : "obj-17",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 182.0, 72.0, 65.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p alternation",
				"hidden" : 1,
				"id" : "obj-11",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 169.0, 77.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 378.0, 44.0, 612.0, 239.0 ],
					"bglocked" : 0,
					"defrect" : [ 378.0, 44.0, 612.0, 239.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "example below demonstrates.",
								"id" : "obj-31",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 117.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp regex|regexp|regexes|regexps",
								"id" : "obj-20",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 299.0, 169.0, 212.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "none",
								"id" : "obj-21",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 520.0, 143.0, 37.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexps",
								"id" : "obj-23",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 403.0, 143.0, 52.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexes",
								"id" : "obj-24",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 351.0, 143.0, 51.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexp",
								"id" : "obj-26",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 299.0, 143.0, 46.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regex",
								"id" : "obj-28",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 468.0, 143.0, 41.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp regexps|regexp|regexes|regex",
								"id" : "obj-19",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 169.0, 212.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "none",
								"id" : "obj-34",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 247.0, 143.0, 37.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexps",
								"id" : "obj-30",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 130.0, 143.0, 52.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexes",
								"id" : "obj-27",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 78.0, 143.0, 51.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regexp",
								"id" : "obj-25",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 143.0, 46.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "regex",
								"id" : "obj-22",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 195.0, 143.0, 41.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "remember because if the object encounters a match it will not continue searching, as the",
								"id" : "obj-18",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 104.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "with character classes, the strings of characters are examined in order. This is important to",
								"id" : "obj-17",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 91.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "the pipe symbol so if you want to limit the search you will need to use it inside parentheses. As",
								"id" : "obj-1",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "possibilities. It is similar to the concept of character classes but it can match strings of characters.",
								"id" : "obj-29",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 525.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "You can use it multiple times in one expression. Alternation matches everything to one side of",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Alternation",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 195.0, 95.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "The pipe symbol is used when you want to match one group of characters out of many ",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Alternation:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 78.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-19", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-20", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-28", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-23", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-24", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-26", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-21", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-22", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-30", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-27", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-25", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-34", 0 ],
								"destination" : [ "obj-19", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Alternation",
				"id" : "obj-6",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 182.0, 52.0, 68.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p dot",
				"hidden" : 1,
				"id" : "obj-20",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 208.0, 143.0, 37.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 351.0, 44.0, 611.0, 200.0 ],
					"bglocked" : 0,
					"defrect" : [ 351.0, 44.0, 611.0, 200.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "7x8",
								"id" : "obj-12",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 234.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp \\\\d.\\\\d",
								"id" : "obj-13",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 130.0, 81.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "234",
								"id" : "obj-14",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 195.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "3.1",
								"id" : "obj-16",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "7x8",
								"id" : "obj-7",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 104.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp \\\\d\\\\.\\\\d",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 130.0, 87.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "234",
								"id" : "obj-9",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "3.1",
								"id" : "obj-4",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 104.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "return matches which you might not be expecting. See below for an example.",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "If you want a literal full-stop you must escape it with a double backslash. Forgetting to do so is a ",
								"id" : "obj-29",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "common mistake and is easily overlooked as it will not stop a match taking place, instead it will ",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Dot",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 156.0, 56.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "The dot metacharacter is a wildcard and will match any character (except the newline character).",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "The Dot:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 63.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-13", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-14", 0 ],
								"destination" : [ "obj-13", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-16", 0 ],
								"destination" : [ "obj-13", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-12", 0 ],
								"destination" : [ "obj-13", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-9", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-4", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-10", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-7", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "The Dot",
				"id" : "obj-15",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 112.0, 53.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p anchors",
				"hidden" : 1,
				"id" : "obj-8",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 143.0, 143.0, 63.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 293.0, 44.0, 611.0, 343.0 ],
					"bglocked" : 0,
					"defrect" : [ 293.0, 44.0, 611.0, 343.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "p note",
								"id" : "obj-1",
								"fontname" : "Arial",
								"numinlets" : 0,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 407.0, 258.0, 44.0, 20.0 ],
								"patcher" : 								{
									"fileversion" : 1,
									"rect" : [ 25.0, 69.0, 640.0, 480.0 ],
									"bglocked" : 0,
									"defrect" : [ 25.0, 69.0, 640.0, 480.0 ],
									"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
									"openinpresentation" : 0,
									"default_fontsize" : 12.0,
									"default_fontface" : 0,
									"default_fontname" : "Arial",
									"gridonopen" : 0,
									"gridsize" : [ 15.0, 15.0 ],
									"gridsnaponopen" : 0,
									"toolbarvisible" : 1,
									"boxanimatetime" : 200,
									"imprint" : 0,
									"enablehscroll" : 1,
									"enablevscroll" : 1,
									"devicewidth" : 0.0,
									"boxes" : [ 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "isn t",
												"id" : "obj-4",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 413.0, 190.0, 50.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "he's M.I.A",
												"id" : "obj-33",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 213.0, 231.0, 64.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "Pilkinton-Smythe",
												"id" : "obj-31",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 380.0, 95.0, 101.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "Pilkinton-Smythe",
												"id" : "obj-30",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 158.0, 95.0, 101.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "newobj",
												"text" : "print woo",
												"id" : "obj-27",
												"fontname" : "Arial",
												"numinlets" : 1,
												"numoutlets" : 0,
												"fontsize" : 12.0,
												"patching_rect" : [ 194.0, 159.0, 59.0, 20.0 ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "C.O.S.P.O.",
												"id" : "obj-26",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 381.0, 70.0, 71.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "C.O.S.P.O.",
												"id" : "obj-25",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 23.0, 60.0, 71.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "i'm mr d'arcy",
												"id" : "obj-23",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 249.0, 48.0, 111.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "this fish isn't d'eath",
												"id" : "obj-22",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 86.0, 28.0, 111.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "is",
												"id" : "obj-20",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 123.0, 71.0, 33.5, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "newobj",
												"text" : "zl iter 1",
												"id" : "obj-18",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 2,
												"fontsize" : 12.0,
												"patching_rect" : [ 325.0, 164.0, 49.0, 20.0 ],
												"outlettype" : [ "", "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "isn't",
												"id" : "obj-17",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 381.0, 43.0, 32.5, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "newobj",
												"text" : "print uhoh",
												"id" : "obj-15",
												"fontname" : "Arial",
												"numinlets" : 1,
												"numoutlets" : 0,
												"fontsize" : 12.0,
												"patching_rect" : [ 326.0, 192.0, 64.0, 20.0 ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "is",
												"id" : "obj-12",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 293.0, 80.0, 32.5, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "newobj",
												"text" : "regexp \\\\b\\\\w+\\\\b",
												"id" : "obj-14",
												"fontname" : "Arial",
												"numinlets" : 1,
												"numoutlets" : 5,
												"fontsize" : 12.0,
												"patching_rect" : [ 285.0, 127.0, 100.0, 20.0 ],
												"outlettype" : [ "", "", "", "", "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "isn't",
												"id" : "obj-7",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 173.0, 54.0, 39.0, 18.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "message",
												"text" : "this fish isn't d'eath",
												"linecount" : 3,
												"id" : "obj-3",
												"fontname" : "Arial",
												"numinlets" : 2,
												"numoutlets" : 1,
												"fontsize" : 12.0,
												"patching_rect" : [ 129.0, 165.0, 53.0, 46.0 ],
												"outlettype" : [ "" ]
											}

										}
, 										{
											"box" : 											{
												"maxclass" : "newobj",
												"text" : "regexp \\\\b[^\\\\s]+",
												"id" : "obj-1",
												"fontname" : "Arial",
												"numinlets" : 1,
												"numoutlets" : 5,
												"fontsize" : 12.0,
												"patching_rect" : [ 131.0, 122.0, 104.0, 20.0 ],
												"outlettype" : [ "", "", "", "", "" ]
											}

										}
 ],
									"lines" : [ 										{
											"patchline" : 											{
												"source" : [ "obj-14", 2 ],
												"destination" : [ "obj-4", 1 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-12", 0 ],
												"destination" : [ "obj-14", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-17", 0 ],
												"destination" : [ "obj-14", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-18", 0 ],
												"destination" : [ "obj-15", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-14", 2 ],
												"destination" : [ "obj-18", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-23", 0 ],
												"destination" : [ "obj-14", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-26", 0 ],
												"destination" : [ "obj-14", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-1", 2 ],
												"destination" : [ "obj-27", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-1", 2 ],
												"destination" : [ "obj-3", 1 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-7", 0 ],
												"destination" : [ "obj-1", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-20", 0 ],
												"destination" : [ "obj-1", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-22", 0 ],
												"destination" : [ "obj-1", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-25", 0 ],
												"destination" : [ "obj-1", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-30", 0 ],
												"destination" : [ "obj-1", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
, 										{
											"patchline" : 											{
												"source" : [ "obj-31", 0 ],
												"destination" : [ "obj-14", 0 ],
												"hidden" : 0,
												"midpoints" : [  ]
											}

										}
 ]
								}
,
								"saved_object_attributes" : 								{
									"default_fontsize" : 12.0,
									"fontname" : "Arial",
									"globalpatchername" : "",
									"fontface" : 0,
									"fontsize" : 12.0,
									"default_fontface" : 0,
									"default_fontname" : "Arial"
								}

							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "this is a misty island",
								"id" : "obj-21",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 247.0, 118.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp is @substitute isn't",
								"id" : "obj-20",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 273.0, 150.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp \\\\bis\\\\b @substitute isn't",
								"id" : "obj-24",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 273.0, 178.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "this is a misty island",
								"id" : "obj-19",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 247.0, 117.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp john$",
								"id" : "obj-17",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 143.0, 80.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "john is tall",
								"id" : "obj-16",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 234.0, 117.0, 64.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "hello john",
								"id" : "obj-13",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 117.0, 62.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp ^a",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 143.0, 73.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "zebra",
								"id" : "obj-9",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 91.0, 117.0, 41.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "antelope",
								"id" : "obj-4",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 117.0, 57.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Another available anchor is the word boundary. It is the letter b escaped with a double ",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 169.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "backslash \\\\b and it matches between a word and non-word character, including at the",
								"id" : "obj-44",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 182.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "beginning and end of a string. The negated form is \\\\B and it matches at every character",
								"id" : "obj-45",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 195.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "boundary that \\\\b does not. The example below shows how using the word boundary anchor can",
								"id" : "obj-46",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 208.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "be used in an expression.",
								"id" : "obj-41",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 221.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "beginning and end of your expression. Notice that it only matches the specified characters and",
								"id" : "obj-33",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "rather than an actual character. The caret matches before the first character and the dollar sign ",
								"id" : "obj-29",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 523.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "not the entire word.",
								"id" : "obj-27",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 91.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "matches after the last character. This means you can specify what you want to match at the",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Anchors",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 299.0, 81.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "The caret and dollar sign metacharacters are called anchors. They match a position in the string",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Anchors:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 63.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-24", 0 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-20", 0 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-21", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-19", 0 ],
								"destination" : [ "obj-24", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-17", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-16", 0 ],
								"destination" : [ "obj-17", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-13", 0 ],
								"destination" : [ "obj-17", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-10", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-9", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-4", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Regular expression results will be printed here.",
				"hidden" : 1,
				"id" : "obj-1",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 130.0, 240.0, 261.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "deferlow",
				"hidden" : 1,
				"id" : "obj-16",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 130.0, 218.0, 56.0, 20.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "print Tutorial",
				"hidden" : 1,
				"id" : "obj-14",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 130.0, 260.0, 77.0, 20.0 ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "loadbang",
				"hidden" : 1,
				"id" : "obj-13",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 193.0, 60.0, 20.0 ],
				"outlettype" : [ "bang" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : ";\rmax maxwindow",
				"linecount" : 2,
				"hidden" : 1,
				"id" : "obj-4",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 218.0, 99.0, 32.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p classes",
				"hidden" : 1,
				"id" : "obj-12",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 78.0, 143.0, 61.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 251.0, 44.0, 625.0, 498.0 ],
					"bglocked" : 0,
					"defrect" : [ 251.0, 44.0, 625.0, 498.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "to escape them with a double backslash. Lower case letters define regular classes and ",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 247.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "uppercase letters define negated classes. They are detailed below. The closing square bracket, ",
								"id" : "obj-49",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 260.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "hyphen and caret are the only metacharacters allowed in a character class. All other characters ",
								"id" : "obj-44",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 273.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "are treated as literals so any other metacharacters do not need to be escaped. If you want to ",
								"id" : "obj-45",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 286.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "use a character class metacharacter as a literal you can either escape it using a double ",
								"id" : "obj-46",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 299.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "backslash or you can use it out of place. A literal closing square bracket should be placed ",
								"id" : "obj-41",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 312.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "directly after the opening square bracket, a literal hyphen should be either the first or last",
								"id" : "obj-42",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 325.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "character in the class and the caret can be included anywhere except the start of the class.",
								"id" : "obj-43",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 338.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\d matches a numerical digit character, equivalent to [0-9]",
								"id" : "obj-38",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 364.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\w matches a word character, equivalent to [a-zA-Z0-9_] note the inclusion of the underscore",
								"id" : "obj-39",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 377.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\s matches a whitespace character, like the tab or newline character",
								"id" : "obj-40",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 390.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\D matches non-digit characters, equivalent to [^\\\\d] and [^0-9]",
								"id" : "obj-37",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 416.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\W matches a non-word character, equivalent to [^\\\\w] and [^a-zA-Z0-9_]",
								"id" : "obj-36",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 429.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\\\S matches a non-whitespace character, equivalent to [^\\\\s]",
								"id" : "obj-35",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 442.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "class by using a caret directly after the opening bracket. A negated class will match anything",
								"id" : "obj-33",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 143.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "except the specified characters.",
								"id" : "obj-31",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 156.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "characters included in the class, in the order they appear, in place of one character from the input.",
								"id" : "obj-29",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 530.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "There are a number of shorthand ways to define common general character classes. You need ",
								"id" : "obj-27",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 234.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "number",
								"minimum" : 0,
								"id" : "obj-19",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 182.0, 50.0, 20.0 ],
								"outlettype" : [ "int", "bang" ],
								"maximum" : 9
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp [^01234]",
								"id" : "obj-20",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 117.0, 208.0, 96.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "number",
								"minimum" : 0,
								"id" : "obj-18",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 182.0, 50.0, 20.0 ],
								"outlettype" : [ "int", "bang" ],
								"maximum" : 9
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp [0-4]",
								"id" : "obj-16",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 208.0, 75.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "You can specify an alphabetical range of characters using a hyphen. You can also negate the",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 130.0, 522.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "groy",
								"id" : "obj-13",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 104.0, 78.0, 32.5, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Classes",
								"hidden" : 1,
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 455.0, 80.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp gr[ae]y",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 104.0, 87.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "grey",
								"id" : "obj-9",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 78.0, 34.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "gray",
								"id" : "obj-4",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 78.0, 34.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Square brackets define a class of characters to look for. The regexp will try to match all the",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 530.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Character Classes:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 119.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-20", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-19", 0 ],
								"destination" : [ "obj-20", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-16", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-18", 0 ],
								"destination" : [ "obj-16", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-13", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-10", 2 ],
								"destination" : [ "obj-11", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-9", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-4", 0 ],
								"destination" : [ "obj-10", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "p types",
				"hidden" : 1,
				"id" : "obj-10",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 143.0, 49.0, 20.0 ],
				"patcher" : 				{
					"fileversion" : 1,
					"rect" : [ 282.0, 44.0, 585.0, 343.0 ],
					"bglocked" : 0,
					"defrect" : [ 282.0, 44.0, 585.0, 343.0 ],
					"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 13.0, 13.0 ],
					"gridsnaponopen" : 0,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "curved brackets",
								"id" : "obj-19",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 130.0, 95.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "{ }",
								"id" : "obj-10",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 128.0, 20.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "a b c",
								"id" : "obj-25",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 221.0, 247.0, 37.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "a b c",
								"id" : "obj-21",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 91.0, 247.0, 37.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "[a-e]*?$",
								"id" : "obj-17",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 247.0, 53.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp \\\\Q[a-e]*?$\\\\E",
								"id" : "obj-14",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 156.0, 273.0, 123.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "message",
								"text" : "[a-e]*?$",
								"id" : "obj-11",
								"fontname" : "Arial",
								"numinlets" : 2,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 247.0, 53.0, 18.0 ],
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "print Types",
								"hidden" : 1,
								"id" : "obj-9",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 299.0, 70.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "regexp [a-e]*?$",
								"id" : "obj-4",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 5,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 273.0, 93.0, 20.0 ],
								"outlettype" : [ "", "", "", "", "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "metacharacters by enclosing them in \\\\Q and \\\\E",
								"id" : "obj-1",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 221.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "escape that and use a double backslash, for example \\\\$ or \\\\* You can escape strings of",
								"id" : "obj-62",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 208.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "would do this with a backslash, however this is a reserved character in Max so you need to",
								"id" : "obj-60",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 195.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "square brackets",
								"id" : "obj-58",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 156.0, 96.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "question mark",
								"id" : "obj-56",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 143.0, 86.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "plus",
								"id" : "obj-54",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 130.0, 33.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "pipe symbol",
								"id" : "obj-52",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 117.0, 75.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "parentheses",
								"id" : "obj-50",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 104.0, 77.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "[ ]",
								"id" : "obj-48",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 156.0, 21.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "?",
								"id" : "obj-46",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 143.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "|",
								"id" : "obj-44",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 117.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "+",
								"id" : "obj-42",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 130.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "( )",
								"id" : "obj-40",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 104.0, 22.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "hyphen",
								"id" : "obj-38",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 208.0, 91.0, 50.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "dot",
								"id" : "obj-36",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 156.0, 27.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "dollar sign",
								"id" : "obj-34",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 143.0, 65.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "caret",
								"id" : "obj-32",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 117.0, 37.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "backslash",
								"id" : "obj-30",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 104.0, 64.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "asterisk",
								"id" : "obj-28",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 65.0, 91.0, 52.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "-",
								"id" : "obj-26",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 182.0, 91.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : ".",
								"id" : "obj-24",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 156.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "$",
								"id" : "obj-22",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 143.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "^",
								"id" : "obj-20",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 117.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "\\",
								"id" : "obj-18",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 104.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "*",
								"id" : "obj-16",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 39.0, 91.0, 19.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "characters have no special meaning. The metacharacters are:",
								"id" : "obj-12",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 65.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Metacharacters have special meanings when used in particular circumstances and literal",
								"id" : "obj-7",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 52.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "If you want to use a reserved metacharacter as a literal you can escape its special function. You",
								"id" : "obj-15",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 182.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "There are two types of characters in regular expressions: literal characters and metacharacters.",
								"id" : "obj-8",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 39.0, 521.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "comment",
								"text" : "Character Types:",
								"id" : "obj-3",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 0,
								"fontface" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 26.0, 13.0, 109.0, 20.0 ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "thispatcher",
								"hidden" : 1,
								"id" : "obj-6",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 2,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 69.0, 69.0, 20.0 ],
								"outlettype" : [ "", "" ],
								"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "t front",
								"hidden" : 1,
								"id" : "obj-5",
								"fontname" : "Arial",
								"numinlets" : 1,
								"numoutlets" : 1,
								"fontsize" : 12.0,
								"patching_rect" : [ 630.0, 47.0, 41.0, 20.0 ],
								"outlettype" : [ "front" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "inlet",
								"hidden" : 1,
								"id" : "obj-2",
								"numinlets" : 0,
								"numoutlets" : 1,
								"patching_rect" : [ 630.0, 20.0, 25.0, 25.0 ],
								"outlettype" : [ "" ],
								"comment" : ""
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-2", 0 ],
								"destination" : [ "obj-5", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-6", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-4", 2 ],
								"destination" : [ "obj-9", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-11", 0 ],
								"destination" : [ "obj-4", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-14", 2 ],
								"destination" : [ "obj-9", 0 ],
								"hidden" : 1,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-17", 0 ],
								"destination" : [ "obj-14", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-21", 0 ],
								"destination" : [ "obj-4", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
, 						{
							"patchline" : 							{
								"source" : [ "obj-25", 0 ],
								"destination" : [ "obj-14", 0 ],
								"hidden" : 0,
								"midpoints" : [  ]
							}

						}
 ]
				}
,
				"saved_object_attributes" : 				{
					"default_fontsize" : 12.0,
					"fontname" : "Arial",
					"globalpatchername" : "",
					"fontface" : 0,
					"fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial"
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Anchors",
				"id" : "obj-9",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 92.0, 55.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Character Classes",
				"id" : "obj-7",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 72.0, 109.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "Character Types",
				"id" : "obj-5",
				"fontname" : "Arial",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 52.0, 99.0, 18.0 ],
				"outlettype" : [ "" ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "Regular Expressions in Max/MSP/Jitter",
				"id" : "obj-3",
				"fontname" : "Arial",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontface" : 1,
				"fontsize" : 12.0,
				"patching_rect" : [ 26.0, 13.0, 233.0, 20.0 ]
			}

		}
 ],
	"lines" : [ 		{
			"patchline" : 			{
				"source" : [ "obj-6", 0 ],
				"destination" : [ "obj-11", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-15", 0 ],
				"destination" : [ "obj-20", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-9", 0 ],
				"destination" : [ "obj-8", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-13", 0 ],
				"destination" : [ "obj-4", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-7", 0 ],
				"destination" : [ "obj-12", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-5", 0 ],
				"destination" : [ "obj-10", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-13", 0 ],
				"destination" : [ "obj-16", 0 ],
				"hidden" : 1,
				"midpoints" : [ 35.5, 215.0, 139.5, 215.0 ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-16", 0 ],
				"destination" : [ "obj-1", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-1", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-17", 0 ],
				"destination" : [ "obj-18", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-19", 0 ],
				"destination" : [ "obj-22", 0 ],
				"hidden" : 1,
				"midpoints" : [  ]
			}

		}
 ]
}
About these ads

11 thoughts on “Regular Expressions in Max/MSP

  1. Hi Luke,

    Thanks so much for putting this tutorial patch together. What a headache this [regexp]… but I know how useful it is!!! Also, thanks for your help on the forum.

    It will take me quite some time to get a basic understanding of it, but if anything is gonna help me do it it is your tutorial. So thanks!

    Can I ask you for some quick help?

    I want to be able to get everything from my path except for “HD:”

    This is, for example, how it comes out: HD:Users:myusername:Desktop:CageFighting:T1035.WAV

    All I want is:
    Users:myusername:Desktop:CageFighting:T1035.WAV

    But I never know long the path will be. I haven’t been able to figure it out. I basically want everything after HD:

    How would you recommend going about it?

    Thanks :-)

    • No problem Andrew, just good timing on my part for once! That regex will work just fine. I hope you find the tutorial useful. I didn’t renew the lightning bolts hosting so everything is being moved here for now. If you get stuck with anything else then you can always post on the Max/MSP forum or ask me about it right here.

  2. Hi Luke!
    First, thank you very much for the nice tutorial.
    Sadly i still can figure out the simple regex:
    I want to strip out a specific word from a string.
    For example this word: TEST
    Hello TEST luke, how are you? -> Hello luke, how are you?

    How to do this?

  3. Try copying this into a blank object box: regexp \\bTEST\\b @substitute %0. The percent zero bit is blank so it will replace every occurence of “TEST” with nothing, effectively removing it. It will also ignore words that contain the target string, for instance “DETEST” in the example above. I hope it helps.

  4. Hi Luke, i’ve tryied around yesterday with different regexp and mashed some toghether until this one seemed to work:
    regexp (?i:TEST) @substitute %0
    (the first outlet outputs the string)

    my second problem is to strip away commas. i really couldnt work it out… :/

  5. Hi Luke,

    Nice tutorial. Many thanks.

    My problem is about commas in filepath strings. I know it’s a reserved character in Max/Msp. I just want to escape them with a backslash or two, but that doesn’t seems to work… I must keep them, only escape them.
    Everytime I get an error in Max : object box has comma or semicolon
    Any idea ?
    Thanks in advance

    Cheers

    Jack

  6. Simple to filter a word from a string: no regexp, it’s zl you want. Open an object box then it’s “zl filter TEST”. That should do it.

    Four year old post, but I’m here now and I know the answer. Might be helpful to an archive browser like myself.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s