tramp-remote-file-name-spec-regexp

tramp-remote-file-name-spec-regexp is a variable defined in `tramp.el'.
Its value is

"\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|: ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?"

  • This variable may be risky if used as a file-local variable.

Documentation:
Regular expression matching a Tramp file name between prefix and postfix.