i need to extract data between two parenthesis
My input:
CREATE TABLE ABC
(
A,
B,
C,
D
);
I want to extract those data in between the two parenthesis.
My output:
A,
B,
C,
D
It is not constant ,the columns always varies from number to number.
like
CREATE TABLE PQR
(
A,
B
);
O/P
A,
B
---------- Post updated at 01:05 AM ---------- Previous update was at 12:11 AM ----------
Thans for sharing this in Perl but i need it to be done in Unix
What makes you think that perl is not available on your UNIX system? Have you tried it? Although perl is not required by the POSIX standards, it is available on most BSD, Linux, and UNIX systems.
Can we do that in While loop.if i have a file which contain some pattern and i will check that pattern in file and if matches i want to get that content to output file.
Exp:Pattern.txt
PQR
ABC
So one pattern goes first and if matches it should grab the whole contents and write into output file.
(
A,
B,
C
)
AND ON 2ND INSTANCE ABC LIKE THIS I WANT TO RUN IN LOOP