Template:Detect-link

From CPU Grave Yard

Description

Detects if text contains a link, internal or external. Returns true if detected, return nothing(blank) if not detected. It is not smart enough to detect valid external link formating.

Usage

  • {{Detect-link|TEXT}}

Examples

  • TEXT: the [[cat]] in the hat
    • Result: true
  • TEXT: the [www.google.com cat] in the hat
    • Result: true
    • note it is not smart enough to detect if its a valid link
  • TEXT: the [https://www.google.com cat] in the hat
    • Result: true
  • TEXT: the '''(cat)''' in the hat
    • Result:
  • TEXT: the [cat in the hat
    • Result:
  • TEXT: the cat] in the hat
    • Result:

Requirements