+// foo/../bar --> foo/bar perl: $new =~ s{[^/]+/\.\./}{/};
+// /./ --> / perl: $new =~ s{/\./}{};
+// // --> / perl: $new =~ s{//}{/};
+const (
+ re_one_or_the_other = `/(\.)?/`
+ re_slash_dot_dot_slash = `[^/]+/\.\./`
+ re_auto_cnf = `/auto\.cnf$`
+ re_binlog = `/binlog\.(\d{6}|index)$`
+ re_charset = `/share/charsets/Index\.xml$`
+ re_db_opt = `/db\.opt$`
+ re_encoded = `@(\d{4})` // FIXME - add me to catch @0024 --> $ for example
+ re_error_msg = `/share/[^/]+/errmsg\.sys$`
+ re_ibdata = `/ibdata\d+$`
+ re_part_table = `(.+)#P#p(\d+|MAX)`
+ re_pid_file = `/[^/]+\.pid$`
+ re_redo_log = `/ib_logfile\d+$`
+ re_relative_path = `^\.\./`
+ re_slowlog = `/slowlog$`
+ re_table_file = `/([^/]+)/([^/]+)\.(frm|ibd|MYD|MYI|CSM|CSV|par)$`
+ re_temp_table = `#sql-[0-9_]+`
+)
+
+var (
+ v_one_or_the_other *regexp.Regexp = regexp.MustCompile(re_one_or_the_other)
+ v_slash_dot_dot_slash *regexp.Regexp = regexp.MustCompile(re_slash_dot_dot_slash)
+ v_table_file *regexp.Regexp = regexp.MustCompile(re_table_file)
+ v_temp_table *regexp.Regexp = regexp.MustCompile(re_temp_table)
+ v_part_table *regexp.Regexp = regexp.MustCompile(re_part_table)
+)
+