Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Parsing a Word placed between special characters

by pillaipraveen (Initiate)
on May 02, 2013 at 09:41 UTC ( #1031715=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^4: Parsing a Word placed between special characters
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-09-15 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls