|
Select text within matching ( ) bracket
Hi,
I am looking for a simple command to select text within a open bracket "("
and a matching close bracket ")" and output the within-bracket-text to a file.
This function is similar to the common vi select a range of text with "(" to ")"
but not sure how to run the same function in command line.
Here's the input file :
statement statement statement
statement statement statement
statement statement statement
Today( "here"
MONDAY = map( "monday")
TUESDAY = map( "tuesday" )
WESNESDAY = map( "wednesday" )
THURSDAY = map( "thursday" )
FRIDAY = map( "friday" )
SATURDAY = map( "saturday" )
SUNDAY = map( "sunday" )
);
statement statement statement
statement statement statement
statement statement statement
Output file :
--------------
Today( "here"
MONDAY = layer( "monday" )
TUESDAY = layer( "tuesday" )
WESNESDAY = layer( "wednesday" )
THURSDAY = layer( "thursday" )
FRIDAY = layer( "friday" )
SATURDAY = pinText( "saturday" )
SUNDAY = pinText( "sunday" )
);
Thanks in advance,
cursive
|