Let me see if I have this straight. You have a file, some sections of which are enclosed in
hoinkies. There is only one level, meaning that nothing will be inside two sets of hoinkies. The file starts with a non-hoinky character. Also, there will be no other uses of brackets; for example:
if(x<10){string oops = ">";}
would not appear. Given these assumptions, you want to pull from this file the sections which are enclosed by the hoinkies. Is this accurate? Here is some code which I believe will solve this problem:
my @separated = split /<|>/, $snippet;
This way, every even entry in the array (starting with the 0th) will have non-UI-related text in it and every odd entry will have UI-text in it. Maybe not enlightened, but it works for me ;)
If the problem is more complex than this, regexen may not be the greatest solution... parsing code is tough and some module may be able to help.
Update: After working on this for a while... parsing code is so hard! What if a value contains <, or >, "semi;", /float(.*)=\;/, etc.? I don't have a module to suggest, but this seems analogous to html parsing-- doing it with regexen will be full of difficulties and exceptions, doing it with a module would be preferable. If you can change the format of the UI data it might also make your job easier. Good luck!