Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #225010

Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]

From William Michels <wjm1@caa.columbia.edu>
Newsgroups linux.debian.user
Subject Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose]
Date 2020-07-19 21:50 +0200
Message-ID <AuntU-1SN-7@gated-at.bofh.it> (permalink)
References (10 earlier) <ArLCp-4oG-3@gated-at.bofh.it> <AsZ0B-7St-5@gated-at.bofh.it> <AtgXw-1P5-13@gated-at.bofh.it> <AtRX3-8jD-1@gated-at.bofh.it> <AufPH-5Jd-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Ajith,

Tom Browder suggests taking a look at Raku (née Perl6), and I concur.
While I don't know Malayalam at all, I can write the regex code below
with ease:

> #all code below using the Raku REPL:
> say '0123456789'.chars;
10
> say $/ if '0123456789' ~~ /  \d+ /;
「0123456789」

> #now with Bengali digits:
> say '০১২৩৪৫৬৭৮৯'.chars;
10
> say $/ if '০১২৩৪৫৬৭৮৯' ~~ /  \d+ /;
「০১২৩৪৫৬৭৮৯」

>#now with Malayalam digits:
> say '൦൧൨൩൪൫൬൭൮൯'.chars;
10
> say $/ if '൦൧൨൩൪൫൬൭൮൯' ~~ /  \d+ /;
「൦൧൨൩൪൫൬൭൮൯」


More info here:

https://www.nntp.perl.org/group/perl.perl6.users/2020/06/msg8828.html
https://www.nntp.perl.org/group/perl.perl6.users/2020/06/msg8845.html

HTH, Bill.



On Sun, Jul 19, 2020 at 4:36 AM Ajith R <ajithramayyan@yahoo.co.in> wrote:
>
> Hi,
>
> > First, there is a somewhat specific question about unspecified
> > substitutions. For all I know about these substitutions, you might
> > actually need XSLT to do them properly.
>
> The substitution that I had in mind requires referring to characters based on their unicode properties like script, block...
>
> > I think you should absolutely use perl if it makes you happy.
> > Unix has a pretty interesting collection of various small tools (which
> > "do one thing and do it well" as you may hear), and shells facilitate
> > hooking up their outputs and inputs. Almost as if they were made to do
> > just that.
>
> I don't prescribe to using a tool for the sake of happiness. With my limited knoweldege I want to select one that is adequate to do the job.
> The subsitution that I wanted in many text files was deleting text from languages other than Malayalam,english and punctuation. This required a program that could match charcters based on their unicode character of block / script. I didn't find anything to suggest that sed could do that. May be, I didn't search properly.
> Did  I miss a utility(including sed) that can do the kind of substitution I mentioned above?
>
> Thanks,
> ajith
>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-06 07:40 +0200
  Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-06 14:30 +0200
  Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-06 14:50 +0200
  Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-06 21:20 +0200
    Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-06 22:40 +0200
      Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 17:20 +0200
    Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-07 08:40 +0200
      Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 17:20 +0200
        Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-09 23:50 +0200
          Re: Using .XCompose [resend of xev_output_annotated.txt] davidson <davidson@freevolt.org> - 2020-07-10 03:40 +0200
          Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-10 10:50 +0200
            Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 10:40 +0200
              Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 12:30 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-12 17:00 +0200
                Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-13 06:00 +0200
                Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 14:00 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-13 20:30 +0200
                Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 20:40 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-13 20:50 +0200
                Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-13 21:50 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-14 05:40 +0200
                Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 16:50 +0200
                Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 17:10 +0200
                Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-15 17:20 +0200
                Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 01:30 +0200
                Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 02:40 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-16 20:40 +0200
                how u mine 4 utf8 [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 03:20 +0200
                UTF-8 Everywhere -- Re: how u mine 4 utf8 [was Re: Using .XCompose] Zenaan Harkness <zenaan@freedbms.net> - 2020-07-18 07:40 +0200
                Re: how u mine 4 utf8 [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 09:20 +0200
                Re: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:00 +0200
                Fw: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 12:50 +0200
                Re: Fw: how u mine 4 utf8 [was Re: Using .XCompose] Tom Browder <tom.browder@gmail.com> - 2020-07-19 13:10 +0200
                Re: how u mine 4 utf8 [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:50 +0200
                sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-18 12:10 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Zenaan Harkness <zenaan@freedbms.net> - 2020-07-18 12:50 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] William Michels <wjm1@caa.columbia.edu> - 2020-07-18 22:00 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-18 13:20 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] songbird <songbird@anthive.com> - 2020-07-18 21:00 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-18 16:00 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-18 22:40 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-18 23:10 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-18 23:30 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] <tomas@tuxteam.de> - 2020-07-19 10:40 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] mick crane <mick.crane@gmail.com> - 2020-07-20 13:20 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Christensen <dpchrist@holgerdanske.com> - 2020-07-19 01:50 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 12:50 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Christensen <dpchrist@holgerdanske.com> - 2020-07-19 23:30 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-19 13:40 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] William Michels <wjm1@caa.columbia.edu> - 2020-07-19 21:50 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] David Wright <deblis@lionunicorn.co.uk> - 2020-07-23 04:00 +0200
                Re: sed:awk:perl::rock:paper:chainsaw [was Re: Using .XCompose] songbird <songbird@anthive.com> - 2020-07-23 12:50 +0200
                Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 02:00 +0200
                Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-16 20:40 +0200
              Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-11 17:00 +0200
                Tex characters Teemu Likonen <tlikonen@iki.fi> - 2020-07-11 18:20 +0200
                Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 22:40 +0200
                Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-13 14:00 +0200
                Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-16 07:50 +0200
              Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-11 18:10 +0200
              Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-20 15:30 +0200
              Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-20 15:30 +0200
                Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-20 18:20 +0200
          Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-10 12:50 +0200
    Re: [offlist] posting style [was Re: Using .XCompose] Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:00 +0200
      Re: [offlist] posting style [was Re: Using .XCompose] Andrei POPESCU <andreimpopescu@gmail.com> - 2020-07-08 07:00 +0200
      Re: [not-so-offlist] posting style [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-08 07:10 +0200
    Re: [offlist] Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:00 +0200
      Re: [offlist] Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 05:20 +0200
      Re: [offlist] Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-08 05:40 +0200
        Re: [offlist] Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 08:00 +0200
  Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-07 00:40 +0200
    tangent on man page locations [was Re: Using .XCompose] davidson <davidson@freevolt.org> - 2020-07-07 01:10 +0200
      Re: tangent on man page locations [was Re: Using .XCompose] David Wright <deblis@lionunicorn.co.uk> - 2020-07-07 03:50 +0200
    Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-07 11:50 +0200
      Re: Using .XCompose Greg Wooledge <wooledg@eeg.ccf.org> - 2020-07-07 13:40 +0200
        Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 16:30 +0200
      Re: Using .XCompose David Wright <deblis@lionunicorn.co.uk> - 2020-07-09 02:20 +0200
        Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-09 04:20 +0200
  Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-08 01:50 +0200
    Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-08 02:30 +0200
    Fw: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 05:10 +0200
    Re: Using .XCompose Ajith R <ajithramayyan@yahoo.co.in> - 2020-07-08 18:40 +0200
      Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-09 04:00 +0200
        Re: Using .XCompose Zenaan Harkness <zenaan@freedbms.net> - 2020-07-10 02:40 +0200
          Re: Using .XCompose The Wanderer <wanderer@fastmail.fm> - 2020-07-10 02:50 +0200
      Re: Using .XCompose davidson <davidson@freevolt.org> - 2020-07-10 05:00 +0200

csiph-web