Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Parsing a Word placed between special characters

by Laurent_R (Abbot)
on May 02, 2013 at 11:52 UTC ( #1031740=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

Again assuming the explored string is in the $_ special variable, the words between square brackets can be retrieved as follows:

$name = $1 if /\w+\[(\w+)\]\w+/;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031740]
help
Chatterbox?
[Tux]: He already knows: his reasons
[Discipulus]: ah thanks Tux; maybe I'll try anyway: marioroy is somehow very new in the Perl world: maybe he understimated the range of antilehmanism
[Discipulus]: good monrnig Corion! and...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-09-20 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (234 votes). Check out past polls.

    Notices?