procmail
[Top] [All Lists]

Re: Text processing stuff

1998-02-20 10:43:57
Matthew Saroff wrote,

|       I would like to get an email with the numbers wrapped in begin and end
| like this:
| begin
| 1(203)555-1212
| 1-817-555-1212
| 16085556789
| end.
|       I want to strip anything outside of the beginning and end out of the
| message, then strip all the non-numeric characters, which I can then put
| through the lookup program to see if there is coverage.

 :0Bbw # and `c' if appropriate
 * ^begin$(.*$)+end$
 | sed -ne 1,/^begin$/d -e /^end$/q -e 's/[^0-9]//g' -e p | lookup_program

<Prev in Thread] Current Thread [Next in Thread>