HiPlease tell me a regex to get everything from < general_information > to < /genearl_information > in the string $string ="< x > < general_information > < a/ > < b/ > < c/ > < d > < /d > < /genearl_information > < /x >";thanks in advance
would suggest you to go with Brian's suggestion however here is what you can use$string =~ s/\(.*)?\<\/x\>/$1/g;
This regex will only give everything before < / x > I think.But I want substring from < general_information > to < /general_information >.This is not the exact string I want to parse. But a dummy string similar to the actual one.I am rather going the regex way because that ways things look easier.
Third, although it might look simpler now, it may not be in the end
I want to use XML dom. Can you please tell how I can parse the attached DCR to set the value of 'menu_type' tag to 'Continental' , for a start?
Hey I solved the regex problem. Wasnt taking care of the new line character in the DCR.
I want to use XML dom. Can you please tell how I can parse the attached DCR to set the value of 'menu_type' tag to 'Continental' , for a start?Hey I solved the regex problem. Wasnt taking care of the new line character in the DCR.