nf-pregex / Download Trends
Total downloads:
8
Description:
A Nextflow plugin that provides human-readable regex pattern builders, inspired by Python's pregex library.
Writing regular expressions can be challenging and error-prone. The nf-pregex plugin provides an intuitive API for building regex patterns using method calls instead of cryptic regex syntax.
# Before (Traditional Regex)
def pattern = /sample(\d)+_(R1|R2)\.fastq\.gz/
# After (nf-pregex)
include { Sequence; Literal; OneOrMore; Digit; Either } from 'plugin/nf-pregex'
def pattern = Sequence([
Literal("sample"),
OneOrMore(Digit()),
Literal("_"),
Either(["R1", "R2"]),
Literal(".fastq.gz")
])
License: Apache License Version 2.0