I'm working on a script for work to extract data from an old template engine schema:
[%price%]
{
$54.99
}
[%/price%]
[%model%]
{
WRT54G
}
[%/model%]
[%brand%]{
LINKSYS
}
[%/brand%]
everything within the [% %] is the key, and everything in the { } is the value. Using Python and regex, I was able to get this far: (?<=[%)(?P\w*?)(?=\%])
which returns ['price', 'model', 'brand']
I'm just having a problem getting it match the bracket data as a value