NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Ideas for stripping tags from document



Its OK -- I have it figgered out now

On Tue, Jan 19, 2021 at 7:09 PM Eric Hawicz <erh%nimenees.com@localhost> wrote:
>
> On 1/17/2021 6:21 PM, Todd Gruhn wrote:
> > HEY Johnny, that thing with  tr -d did not work. When I read the
> > manpage I got and idea:
> > character classes (in this case [:cntrl;]). It turns out that one can do
> >
> > s/[[:cntrl]]/\n/g
> >
> > using PERL. That fixed the prob with \x{d}. I still need to fix \x{92}
> > , \x{93}, etc
> >
> > It would be nice to do: system(tr -d .... $text). Then write the
> > result to filehandle.
> > Where do you get the octal vals for \x{92} , \x{93} , etc ?
>
> If you're already doing stuff in perl, it's pointless to run anything
> external.  Just include \x92, \x93, etc... in a regex, just like you're
> doing for control characters.  i.e. $text =~ s/[\x92\x93]//g; or
> whatever replacement you actually want to do.
>
>
> Eric


Home | Main Index | Thread Index | Old Index