Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Parsing a Word placed between special characters

by davido (Cardinal)
on May 01, 2013 at 19:02 UTC ( [id://1031632]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing a Word placed between special characters
in thread Parsing a Word placed between special characters

If someone posts \[abc\] without <code> tags, everyone will see \abc\. What's unclear to me is if the backslashes are significant or not.


Dave

Replies are listed 'Best First'.
Re^3: Parsing a Word placed between special characters
by Laurent_R (Canon) on May 01, 2013 at 20:15 UTC
    I agree, the input is unclear.
      Thanks to everyone who responded. The query was in fact obscure since I didn't use the <code> tag. Please find the query in a proper format below.

      I have a file called names.txt with the following content
      john[JM]mcgroddy
      stephen[SG]gomsey
      yuri[YA]alchenko

      I was trying to extract the initials placed between special characters  [and ] and output this to a new file initials.txt as

      JM
      SG
      YA

      .

      I hope that I have clarified the question. Thanks once again to those who guided me the correct regex. Regards, PS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1031632]
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: (4)
As of 2024-03-29 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found