Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Extraction of letters from a string

by t-rex (Scribe)
on Nov 24, 2016 at 13:19 UTC ( [id://1176494]=note: print w/replies, xml ) Need Help??


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 (Bishop) 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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1176494]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found