Hi all,
For reasons best known to myself I need to take a source file, read it into a PHP script, pick out all instances of a variable called $ST and wrap them in DIV tags, so imagine a file like:
<h1> Welcome to $ST['site'], have a nice visit you $ST['epithet']
I want to wrap DIV tags around $ST['site'], $ST['epithet'] and any other $ST['INSERTSTUFFHEREs'] that I find, including the bit between ' and ' as the name in the DIV, so the output will include:
<div name='site'>$ST['site']</div>
Being hopeless with regex doesn't help and I've got a partial expression which matches the string but doesn't do the replace - can anyone help shed light on how I might actually sort this out before I lose the will to live?
TIA
Chris