in reply to Re: Extraction of letters from a string
in thread Extraction of numbers in an string

here the m,n,p,q... are numbers which can change based on the user, so writing a regex just to hardcode with numbers won't be a good idea i guess

  • Comment on Re^2: Extraction of letters from a string

Replies are listed 'Best First'.
Re^3: Extraction of digits from a string
by hippo (Archbishop) on Nov 24, 2016 at 13:24 UTC

    How was m,n,p etc. supposed to represent digits? Anyway, if you want to match digits, match digits:

    #!/usr/bin/env perl use strictures; my @v = 'A1=<9,8>:<7,6>:<5,4>...go on' =~ /\d/ag;

      Hi, I have one doubt , what should be changed if double or triple digits are to be considered , as of now the above mentioned code (your solution) splits 10 as 1 0

      I edited my post, as i hastily put it, pls check the edited one, thank you that works :)