On Sun, Sep 25, 2011 at 12:34:20AM +0100, John Delacour wrote:

> The following Text Filter will, so far as I can tell, do the job.  I 
> have even tried putting Chinese characters withing the guillemets. 
> It's probably far more longwinded than it needs to be but it works.
> 
> 
> 
> #!/usr/local/bin/perl
> use strict;
> use encoding 'utf-8';
> my $inside;
> while (<>) {
>   my @chars = split //;
>   for (@chars) {
>     my $ord = ord;
>     $inside = 1 if $ord == 171;
>     $inside = 0 if $ord == 187;
>     if ($inside) {
>       print if $ord == 171;
>       print if /[a-z]|[0-9]| |-/i;
>     } else {
>       print;
>     }
>   }
> }
> __END__
> 
> JD

When I run this filter on your sample text, I get the following result:

http://gyazo.com/5bc49629f7d4b0faf663634585fd6355.png

What am I doing wrong?

thanks,
Ronald

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to