Hi,
I just can't figure out the search/replace coding to change lines of text from:
<a name="john">JOHN</a>
<a name="doris">DORIS</a>
<a name="abdul">ABDUL</a>
to
<a name="john"> </a>JOHN
<a name="doris"> </a>DORIS
<a name="abdul"> </a>ABDUL
... where the names are many and all different.
Thanks very much.
I'm sure this is possible, but my brain hurts trying ...
Hi,
It's quite simple
We can provide at least two possible solutions.
Go to main menu - Action - Options - Batch Replace
uncheck "Modifier S"
uncheck "Modifier G"
check "Modifier M"
check "Modifier I"
check "Modifier E"
Go to Batch replace tab, check on "Use regular expressions".
Put search for and replace with pairs in the batch grid.
Solution #1:
It will search all <a> tags where precisely john=JOHN, doris=DORIS etc
i.e. "name" parameter matches to the text inside <a> tag.
Use the following pair:
Search for:
<a name="(.*)">\1</a>
Replace with:
<a name="$1"> </a><%=Upper("$1")=%>
Solution #2:
This is less precise solution. It will simply take all found <a> tags
having name parameter and then replace the text in <a> by and
put this text out of the tag (after </a>). Drawback: it can match for
the following string, for example: <a name="john">DORIS</a>. Result
will be: <a name="john"> </a>DORIS
Use the following pair:
Search for:
<a name="(.*)">(.*)</a>
Replace with:
<a name="$1"> </a>$2
That's all I verified it works perfectly.
It's quite simple

We can provide at least two possible solutions.
Go to main menu - Action - Options - Batch Replace
uncheck "Modifier S"
uncheck "Modifier G"
check "Modifier M"
check "Modifier I"
check "Modifier E"
Go to Batch replace tab, check on "Use regular expressions".
Put search for and replace with pairs in the batch grid.
Solution #1:
It will search all <a> tags where precisely john=JOHN, doris=DORIS etc
i.e. "name" parameter matches to the text inside <a> tag.
Use the following pair:
Search for:
<a name="(.*)">\1</a>
Replace with:
<a name="$1"> </a><%=Upper("$1")=%>
Solution #2:
This is less precise solution. It will simply take all found <a> tags
having name parameter and then replace the text in <a> by and
put this text out of the tag (after </a>). Drawback: it can match for
the following string, for example: <a name="john">DORIS</a>. Result
will be: <a name="john"> </a>DORIS
Use the following pair:
Search for:
<a name="(.*)">(.*)</a>
Replace with:
<a name="$1"> </a>$2
That's all I verified it works perfectly.