Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The Regex Tools connector provides regular expression operations for pattern matching, extraction, and text manipulation.
No connection required — this utility connector works out of the box.

Tools

text
string
required
Text to search.
pattern
string
required
Regular expression pattern.
flags
string
default:"g"
Regex flags (e.g., g, i, m).
Example request:
{
  "text": "Contact us at support@example.com or sales@example.com",
  "pattern": "[\\w.+-]+@[\\w-]+\\.[\\w.]+",
  "flags": "g"
}
Example response:
{
  "count": 2,
  "matches": [
    "support@example.com",
    "sales@example.com"
  ]
}
text
string
required
Text to search.
pattern
string
required
Pattern with capture groups.
flags
string
default:"g"
Regex flags.
Example request:
{
  "text": "Order #1234 placed on 2026-04-02, Order #5678 placed on 2026-04-03",
  "pattern": "Order #(\\d+) placed on (\\d{4}-\\d{2}-\\d{2})",
  "flags": "g"
}
Example response:
{
  "matches": [
    {
      "fullMatch": "Order #1234 placed on 2026-04-02",
      "groups": ["1234", "2026-04-02"],
      "index": 0
    },
    {
      "fullMatch": "Order #5678 placed on 2026-04-03",
      "groups": ["5678", "2026-04-03"],
      "index": 34
    }
  ],
  "count": 2
}
text
string
required
Source text.
pattern
string
required
Regex pattern.
replacement
string
required
Replacement string. Use $1, $2 for capture groups, $& for full match.
flags
string
default:"g"
Regex flags.
Example request:
{
  "text": "2026-04-02",
  "pattern": "(\\d{4})-(\\d{2})-(\\d{2})",
  "replacement": "$2/$3/$1"
}
Example response:
{ "result": "04/02/2026", "replacements": 1 }
text
string
required
Text to split.
pattern
string
required
Regex pattern.
limit
number
Maximum number of splits.
Example request:
{
  "text": "apple;; banana, cherry  orange",
  "pattern": "[;,\\s]+"
}
Example response:
{
  "parts": ["apple", "banana", "cherry", "orange"],
  "count": 4
}
Returns true or false.
text
string
required
Text to test.
pattern
string
required
Regex pattern.
flags
string
default:""
Regex flags.
Example request:
{
  "text": "192.168.1.100",
  "pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
}
Example response:
{ "matches": true }
Escape regex special characters so a string can be used as a literal pattern.
text
string
required
Text to escape.
Example request:
{
  "text": "price is $9.99 (USD)"
}
Example response:
{ "result": "price is \\$9\\.99 \\(USD\\)" }
pattern
string
required
Regex pattern to validate.
flags
string
default:""
Regex flags.
Example request:
{
  "pattern": "[a-z",
  "flags": "g"
}
Example response:
{
  "valid": false,
  "error": "Invalid regular expression: /[a-z/: Unterminated character class"
}
text
string
required
Text to search.
pattern
string
required
Regex pattern.
flags
string
default:"g"
Regex flags.
Example request:
{
  "text": "the cat sat on the mat",
  "pattern": "\\b\\w{3}\\b",
  "flags": "g"
}
Example response:
{ "count": 5 }
Returns start and end positions of each match.
text
string
required
Text to search.
pattern
string
required
Regex pattern.
flags
string
default:"g"
Regex flags.
Example request:
{
  "text": "Error on line 12, error on line 45",
  "pattern": "\\d+",
  "flags": "g"
}
Example response:
{
  "positions": [
    { "match": "12", "start": 14, "end": 16 },
    { "match": "45", "start": 32, "end": 34 }
  ],
  "count": 2
}