Text diff
Compare text line by line with clear additions and deletions.
diffTest JavaScript regex patterns with positions, capture groups and highlighting. A bounded worker keeps matching separate, with flag and escaping examples.
Enter a pattern without / delimiters. Matching runs in a separate worker and is stopped on timeout. Up to 500 matches are displayed.
Pattern: order-(\d+)
Flags: g
Text: order-104 and order-205Enter each line’s value in its corresponding field. Matches should be order-104 and order-205, with capture groups 104 and 205.
Use g to find multiple matches. Without g or y, this tester returns the first match only. Also check whether the pattern restricts where a match may occur.
String literals add an escaping layer. Enter regex text such as \d+ here; the same pattern in a JavaScript string is commonly written "\\d+".
The worker stops after 1.5 seconds and displays up to 500 matches. Limits are 10,000 UTF-16 code units for the pattern and 100,000 for test text. Reduce the sample to debug. This uses JavaScript, which can differ from dialects such as PCRE.