Originally I had a text like this;
asa#fathernode
{oi#string
oi2#string}
My script get an array like this (because other treatments are happening):
[ "asa#fathernode" , "{oi#string" , "oi2#string}" ]
I then make a string like this:
"asa#fathernode\n{oi#string\noi2#string}\n"
My script before I was getting the string untreated(without the "\n"):
asa#fathernode{oi#stringoi2#string}
and I was using:
textoFather = textoFather.match(/{(.*?)}/)[1];
to get what's between the curly braces, that was
"oi#stringoi2#string"
but I need it formatted as it was originally
oi#string
oi2#string
and because (I believe) that pattern isn't getting the "\n", the textoFather is returning null
I really need to get the "\n" for the rest of the script to keep working (Many other things are happening but the important is to get the text formatted), also the text presented is just an example, the actual text is HUGE and have some little differences (in the text string can actually be many other words not just string)
Obs:I really hope this is just a pattern(match) problem, but if it isn't I'm just a beginner in JavaScript and my native language isn't English so I would need a pretty detailed explanation on how to resolve my problem.