Regex Helper avatar

Regex Helper

Pricing

$0.01 / 1,000 processed texts

Go to Apify Store
Regex Helper

Regex Helper

Apply named regular expressions to submitted text or an Apify dataset. Get matches by pattern with values, positions, capture groups, and a total match count.

Pricing

$0.01 / 1,000 processed texts

Rating

0.0

(0)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

🧩 Find regex matches in a batch of text

Regex Helper is for developers, data teams, and business teams that need structured matches from text. Apply named Python-compatible regular expressions to pasted text or rows in an Apify dataset. Get each match value, its position, capture groups, named groups, and a total match count.

📦 Returned data

The Actor saves one row for each processed text. Matches are grouped by your pattern names. A pattern gets an empty array when it finds no match, so you can still see which patterns were checked.

For each match, you get the full value, zero-based start and end positions, numbered capture groups, and named capture groups. You can ask for every occurrence or only the first occurrence for each pattern in each text.

▶️ Running the Actor

  1. Choose Submitted texts or Apify dataset as the target.
  2. Add your text, or choose a dataset and the field that holds its text.
  3. Keep the ready-made patterns, or add your own named patterns.
  4. Choose all or first match mode and any regex flags.
  5. Run the Actor and open the dataset.

The ready-made patterns find emails, phone numbers, URLs, and LinkedIn references. They find text that fits each pattern. They do not prove ownership, identity, or deliverability.

🧾 Input

FieldTypeWhat it does
targetstringChooses text entered in the form or rows from an Apify dataset.
textsarray of stringsLists text values to process when target is texts. Each value is handled on its own.
datasetIdstringSelects the Apify dataset to read when target is dataset.
datasetTextFieldstringNames the dataset row field that holds the text. The default is text.
patternsarray of objectsSets custom named Python-compatible regular expressions. Leave it empty to use the ready-made contact patterns.
patterns[].namestringGives a pattern its unique output group name.
patterns[].expressionstringSets the Python-compatible regular expression.
matchModestringUses all for every occurrence or first for only the first occurrence per pattern and text.
flagsarray of stringsApplies IGNORECASE, MULTILINE, DOTALL, VERBOSE, or ASCII to all custom patterns.

This example is the public input from a successful run with the default text:

{
"target": "texts",
"texts": [
"Team contacts:\nsupport@example.com and sales@example.com\nCall +1 (415) 555-0134\nVisit https://example.com/help\nLinkedIn: linkedin.com/company/example"
],
"datasetTextField": "text",
"matchMode": "all"
}

The Actor checks the input before it starts. Invalid regular expressions, unknown flags, and repeated pattern names cause a clear error.

📊 Output

Each dataset row has this shape:

FieldTypeWhat it does
textstringHolds the full text that was processed.
matchCountintegerCounts all matches across all patterns.
matchesByPatternobjectGroups match arrays by pattern name.
matchesByPattern.<name>array of objectsLists matches for one pattern, or an empty array when none were found.
matchesByPattern.<name>[].valuestringHolds the full matched value.
matchesByPattern.<name>[].startintegerGives the zero-based position where the match starts.
matchesByPattern.<name>[].endintegerGives the zero-based position just after the match ends.
matchesByPattern.<name>[].groupsarrayLists numbered capture values in pattern order. A missed group is null.
matchesByPattern.<name>[].namedGroupsobjectMaps named capture groups to their values. A missed group is null.
{
"text": "Team contacts:\nsupport@example.com and sales@example.com\nCall +1 (415) 555-0134\nVisit https://example.com/help\nLinkedIn: linkedin.com/company/example",
"matchCount": 5,
"matchesByPattern": {
"emails": [
{
"value": "support@example.com",
"start": 15,
"end": 34,
"groups": [],
"namedGroups": {}
},
{
"value": "sales@example.com",
"start": 39,
"end": 56,
"groups": [],
"namedGroups": {}
}
],
"phoneNumbers": [
{
"value": "+1 (415) 555-0134",
"start": 62,
"end": 79,
"groups": [],
"namedGroups": {}
}
],
"urls": [
{
"value": "https://example.com/help",
"start": 86,
"end": 110,
"groups": [],
"namedGroups": {}
}
],
"linkedinReferences": [
{
"value": "linkedin.com/company/example",
"start": 121,
"end": 149,
"groups": [],
"namedGroups": {}
}
]
}
}

💳 Pricing

This Actor uses pay-per-event pricing. You pay for each processed text saved to the dataset. The charge covers the text row and its match data, including rows where the checked patterns find no match.

🔌 Integrations

Use the dataset through the Apify API, webhooks, schedules, or Apify integrations. This video shows how to connect an Actor to other tools:

❓ FAQ

Can it scrape text from a website?

No. The Actor only checks text you submit or text in an existing Apify dataset. Use a text extraction Actor first if you need to fetch a page.

Can I use my own patterns?

Yes. Add one or more unique names and Python-compatible regular expressions in patterns. Custom patterns replace the ready-made patterns for that run.

What happens when a pattern finds nothing?

The output keeps the processed text and the pattern name. That pattern has an empty match array, and matchCount shows the total across all patterns.

Can it replace or clean the matched text?

No. It finds and describes matches but does not rewrite the input text.

How does first match mode work?

For each pattern and each text, first saves only the first occurrence. Use all to collect every occurrence.

📝 Changelog

0.0: Initial release

  • Extract structured matches with positions and capture groups from submitted text or Apify dataset rows using built-in or custom named regex patterns.

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

Made with ❤️ by Maxime Dupré