As suggested by Jochen Theodorou in this <http://groovy.329449.n5.nabble.com/New-DSLs-in-the-groovy-platform-itself-for-more-script-like-use-cases-td5750522.html> post, I have created this topic for `Text / String processing`
I have always felt that groovy platform itself can have rich set of DSLs (list given below) so that groovy will be in hands of many non-developers.

Also, the command line String/text processing capabilities can be greatly enhanced with java/groovy power.

Use Case 1 : command line usage Simple input processing can be done in the command line itself
$ groovy -e --complex 'def s = 0; EACHLINE {s+=line.numval}; END {println s}'
Use Case 2 : DSL Script for more complex line processing functionalities (similar to 'awk') with java / groovy power
def s = ....
......
......

//for choosing lines with regex
matches (regex) {
   work for those lines
}


//for choosing lines with some expression
matches {

   condition {expression for line selection}

   process {
        work for those lines
   }
}

END {
   //end closure after processing all matching lines of the input files
}


Sent from the Groovy Dev mailing list archive at Nabble.com.