test-pcre
PCRE2 test harness installed here as test_pcre. It is the standard pcre2test-style CLI for trying patterns against subjects, checking compile-time options, and timing compilation or matching.
Quick Start
- Command:
test_pcre [options] [input [output]] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/test_pcre - Reported tool identity:
pcre2test
When To Use This Tool
- Trying a PCRE2 pattern against sample subjects before embedding it elsewhere
- Checking PCRE2 build capabilities such as JIT, Unicode, newline type, or enabled library widths
- Timing regex compilation or execution with
-t,-tm,-T, or-TM - Debugging pattern behavior with
-d,-i, or other pcre2test modifiers
Common Patterns
# Show usage
test_pcre -help
# Show version
test_pcre -version
# Minimal pattern/subject test via stdin
printf '/abc/\nabc\n\n' | test_pcre
Recommended Workflow
- Start with
test_pcre -helportest_pcre -Cto confirm available PCRE2 features. - Feed pattern/subject pairs through stdin or an input file in pcre2test format.
- Add debug/info/timing flags only after the base match works.
- Use the exact local command name
test_pcre, not the skill folder name.
Guardrails
- The real executable here is
test_pcrewith an underscore, nottest-pcre. test_pcre -helpworks and prints standardpcre2testusage;-versionreportsPCRE2 version 10.44 2024-06-07.- In live testing,
printf '/abc/\nabc\n\n' | test_pcreproduced a successful match with capture line0: abc. -v|--versionis documented by the tool, so GNU-style--versionshould be treated as valid for the real executable even though the old skill text assumed otherwise.