+ DNS records: supports MX, TXT, SOA and NS (NPM driver only).
+
+
+ { "MX": "example\\.com" }
+
+
+
+
js
+
Object
+
+ JavaScript properties (case sensitive). Avoid short property
+ names to prevent matching minified code.
+
+
{ "jQuery.fn.jquery": "" }
+
+
+
headers
+
Object
+
HTTP response headers.
+
{ "X-Powered-By": "^WordPress$" }
+
+
+
html
+
String | Array
+
+ HTML source code. Patterns must include an HTML opening tag to
+ avoid matching plain text. For performance reasons, avoid
+ html where possible and use
+ dom instead.
+
+
"<a [^>]*href=\"index.html"
+
+
+
css
+
String | Array
+
+ CSS rules. Unavailable when a website enforces a same-origin
+ policy. For performance reasons, only a portion of the available
+ CSS rules are used to find matches.
+
+
"\\.example-class"
+
+
+
robots
+
String | Array
+
+ Robots.txt contents.
+
+
"Disallow: /unique-path/"
+
+
+
url
+
String
+
Full URL of the page.
+
"^https?//.+\\.wordpress\\.com"
+
+
+
meta
+
Object
+
HTML meta tags, e.g. generator.
+
{ "generator": "^WordPress$" }
+
+
+
scripts
+
String | Array
+
+ URLs of JavaScript files included on the page.
+
+
"jquery\\.js"
+
+
+
+
+## Patterns
+
+Patterns are essentially JavaScript regular expressions written as strings, but with some additions.
+
+### Quirks and pitfalls
+
+- Because of the string format, the escape character itself must be escaped when using special characters such as the dot (`\\.`). Double quotes must be escaped only once (`\"`). Slashes do not need to be escaped (`/`).
+- Flags are not supported. Regular expressions are treated as case-insensitive.
+- Capture groups (`()`) are used for version detection. In other cases, use non-capturing groups (`(?:)`).
+- Use start and end of string anchors (`^` and `$`) where possible for optimal performance.
+- Short or generic patterns can cause applications to be identified incorrectly. Try to find unique strings to match.
+
+### Tags
+
+Tags (a non-standard syntax) can be appended to patterns (and implies and excludes, separated by `\\;`) to store additional information.
+
+
+
+
+
+
Tag
+
Description
+
Example
+
+
+
+
+
confidence
+
+ Indicates a less reliable pattern that may cause false
+ positives. The aim is to achieve a combined confidence of 100%.
+ Defaults to 100% if not specified.
+
+
+ "js": { "Mage": "\\;confidence:50" }
+
+
+
+
version
+
+ Gets the version number from a pattern match using a special
+ syntax.
+
+
+### Version syntax
+
+Application version information can be obtained from a pattern using a capture group. A condition can be evaluated using the ternary operator (`?:`).
+
+
+
+
+
+
Example
+
Description
+
+
+
+
+
\\1
+
Returns the first match.
+
+
+
\\1?a:
+
+ Returns a if the first match contains a value, nothing
+ otherwise.
+
+
+
+
\\1?a:b
+
+ Returns a if the first match contains a value, b otherwise.
+
+
+
+
\\1?:b
+
+ Returns nothing if the first match contains a value, b
+ otherwise.
+