fork download
  1. #!/bin/sh
  2.  
  3. STRING=$( cat <<EOF
  4. cabinetmaker
  5. calcographer
  6. calligrapher
  7. campanologer
  8. campylometer
  9. c..........er
  10. c........er
  11. ..........
  12. foobar
  13. EOF
  14. )
  15.  
  16. echo "$STRING" | grep -P '^(?=.{12}$)c.*er$'
Success #stdin #stdout 0.02s 5312KB
stdin
Standard input is empty
stdout
cabinetmaker
calcographer
calligrapher
campanologer
campylometer