-def toDiffableString(value):
-    s = repr(value)
-    ds = ""
-    i = s.find(" at 0x") 
-    start = 0
-    while (i >= 0):
-        j = s.find(">", i)
-        if (j < i):
-            break
-        ds += s[start:i]
-        start = j
-        i = s.find(" at 0x", start) 
-    return ds + s[start:]
-    
+pythonFileRefPattern = asString(r'(?<=File ")[^"]*(#[^#]*")(, line )[0-9]*')
+phpFileRefPattern = asString(r'( in ).*#([^#]*#[^ ]*)(?= on line )')
+pathSepPattern = os.sep
+if (pathSepPattern == "\\"):
+    pathSepPattern = "\\\\"
+pythonFileRefPattern = pythonFileRefPattern.replace("#", pathSepPattern)
+pythonFileRefPattern = re.compile(pythonFileRefPattern)
+phpFileRefPattern = phpFileRefPattern.replace("#", pathSepPattern)
+phpFileRefPattern = re.compile(phpFileRefPattern)
+