Shared flowchart

Software · L3 · Regex or Real Parser?

A decision flow from the shape of the text-processing problem to regex vs a dedicated parser.

by @openstemUpdated Software
Define what needs to be extracted or validatedDoes the structure nest arbitrarily deep? e.g. balanced bracketsUse a real parser: recursive descent, PEG, or parser generatorIs the pattern a flat, bounded shape? e.g. email, token, line formatRegex is appropriateAny nested/adjacent quantifiers over overlapping sets?Risk of catastrophic backtracking: rewrite pattern or use atomic groupsSafe to use as-isYesNoYesYesNo

We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy