You need to define very precisely and very accurately what you're looking for when designing a regex.

Please clarify: - is the text you want to study in a string variable? In a file? - does it contain only what you have shown or does it have a repetition of such 3-line paragraphs?? - are the { and } characters part of the string?

I would be good to quote verbatim your input data in within a code block so that we can figure exactly what it looks like.

As Laurent has already said, we need more information. I have made a number of assumptions and proposed a solution which requires them. If this does help in any other way, I hope it helps you to post a better statement of your problem.

Code

use strict; use warnings; #post 84614

=assumptions Text is in a string (or you can read it into a string yourself)

- is the text you want to study in a string variable? In a file? ANS:the text will be present in the file i am reading the file line by line .

- does it contain only what you have shown or does it have a repetition of such 3-line paragraphs??

ANS: It will have repetition in the file . only "WAR" "init" "ev" will be common in the paragraph . i am looking to get the string between the {} without '&' "1*BIN0,2*DEC3,6*BIN4, 5*BIN43,6*DEC32, 5*BIN43,7*DEC32"

war wear, init =1*DEC1, ev = { & 1*BIN0,2*DEC3,6*BIN4, & 5*BIN43,6*DEC32, & 5*BIN43,7*DEC32,6*DEC32,6*DEC3, & 8*BIN3,6*DEC34 } - are the { and } characters part of the string? i am looking to get the string between the {} without '&' character.

It will have repetition in the file . only "WAR" "init" "ev" will be common in the paragraph . i am looking to get the string between the {} without '&' "1*BIN0,2*DEC3,6*BIN4, 5*BIN43,6*DEC32, 5*BIN43,7*DEC32"

Laurent and I have made exactly the same assumptions and we each proposed two step solutions. I do not see any reason in your new post that says you could not use either one.

It now appears that your data is in a file and you do not know how to read it into a string. Show us what you have done to read the file (Omit parsing. We can return to that later). Attach a realistic sample data file. Verify that we can run your code against your data and duplicate your error.

Hint: In the data that you have posted, "paragraphs" are separated by a single blank line. If this is always true, you should use the special variable 'INPUT_RECORD_SEPARATOR' ($/).