Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Interpretation of my output

by wol (Hermit)
on Nov 06, 2008 at 10:51 UTC ( [id://721945]=note: print w/replies, xml ) Need Help??


in reply to Interpretation of my output

I'm not sure what output you're hoping for, but there's certainly something odd in the regexp, and I don't think that the code you've posted here produces the output you've posted here. Certainly isn't the case when I try it.

Did you want the final line of output to be this:

(ABE)
If so, you'll need to insert some []s to indicate that A-Z is one of a range of characters and remove some ?s to insist on brackets in the bits of your input you want to substitute. However, I can't commit myself to a final answer until I'm more cetain of what you're after :-)

--
.sig : File not found.

Replies are listed 'Best First'.
Re^2: Interpretation of my output
by Utilitarian (Vicar) on Nov 06, 2008 at 13:41 UTC
    (A(((BC)D)(EF))) (A(((BC)D)(EF))) (A((BD)(EF))) (A((BD)(EF))) (A(B(EF))) (A(B(EF))) (A(BE)) (A(BE)) (AB) (AB) A
    Could be the progression you require, otherwise as stated above you end up with (ABE).

    If that is what you require, then this could be what you need, if not, it's a starting point ;)

    s/\(([^)])[^)]\)/$1/
Re^2: Interpretation of my output
by blazar (Canon) on Nov 06, 2008 at 20:23 UTC
    If so, you'll need to insert some []s to indicate that A-Z is one of a range of characters

    I personally believe that (s)he has inserted those []'s, except that not having put code inside <code> tags as (s)he should have they rendered like hyperlinks due to the shortcuts available as part of the markup here at the monastery, à la A-Z. (ATM, that is: at a later time, someone reading this thread may hopefully find the root node duly edited...) To see the code closer to the way the OP really meant it you could try the xml view of the node.

    --
    If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found