|We don't bite newbies here... much|
substitute characters in the RHS of a search & replaceby Anonymous Monk
|on Mar 08, 2013 at 21:30 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
From wikipedia, I have a string like the following: Here are [[a variable number of words]] in brackets.
I think I'm being dense, as I can't think of a one-liner I can use to substitute the double square brackets with their contents, while at the same time replacing spaces with underscores within the brackets. In other words, I want to get Here are a_variable_number_of_words in brackets.