File: demo_str2regexp

package info (click to toggle)
runawk 1.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: awk: 1,127; ansic: 736; sh: 420; makefile: 103
file content (11 lines) | stat: -rwxr-xr-x 213 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env runawk

#use "str2regexp.awk"

# This demo converts string ($0) to regexp that matches this string

# Input files for this demo: examples/demo_str2regexp.in*

{
   print $0 " --> " str2regexp($0)
}