in reply to I need a Regex to get my Dirty Data Whiter.
Given that most printable characters appear in consecutive runs in most popular character sets, it's easy to build a character class which only includes them. for example, for 7-bit ASCII you can write something like this to only print character between the space (0x20) and the tilde (0x7E).
--while (<>) { s/[^ -~]//g; print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: I need a Regex to get my Dirty Data Whiter.
by merlyn (Sage) on Aug 03, 2000 at 16:54 UTC | |
by davorg (Chancellor) on Aug 03, 2000 at 16:58 UTC |