Page 1 of 1

ideas on removing tags within tags over multiple lines

Posted: Mon Nov 24, 2003 9:31 am
by triggsley
Hi all

I've just discovered the true power of textpad, having been a big fan of macros for a long time, regex expressions has given me rocket boots to climb the mountains of the world.

Problem how do i take out the <br> tags within the table, i just keep getting "Cannot find regular expression:"

Code: Select all

<table>
<tr>
	<td>asdasdasdds<br>
	asdasdasdd<br>
	asdasdasdasdasd</td>
</tr>
<tr>
	<td>asdasdasdds asdas sad
                dsfsfd sdfssdf fsddsf dfsdfsd 
                sdfsfw ewrwerwer wewerwwer<br>
	asdasdasdd<br>
	asdasdasdasdasd</td>
</tr>
</table>
It would be easier for me to remove the <br> tags within the <td></td> tags.

I've tried

Code: Select all

find: <td>\(.*\)\([<br>]\)</td>
with: <td>\1</td>
Any ideas, also any good tutorial sites on expressions would be great.

Many Thanks

Triggsley

Posted: Mon Nov 24, 2003 9:54 am
by CyberSlug
Easy: UNcheck the box for regular expressions :-)

Code: Select all

Find what:  <br>
Replace with:

nice try

Posted: Mon Nov 24, 2003 10:45 am
by triggsley
Sorry i did not explain fully.

Code: Select all

asdasdad<br>
dfsdfsdfsdfsdf<br>
<table>
<tr>
	<td>asdasdasdds
	asdasdasdd<br>
	asdasdasdadsasdas
	asdasdasdasdasd</td>
</tr>
<tr>
	<td>asdasdasdds<br>
	asdasdasdd<br>
	asdasdasdasdasd</td>
</tr>
</table>
asdasdad sdfsdf sdfssdf
dfsdfsdfsdfsdf<br>
sdfsfsdfsfsdf
so i dont want to replace the <br> tags that are out of the table tags.

story so far.

I have a html document that has been scanned via omnipage and it puts a <br> on each line of a table, it doesnt understand how to wrap text.

I just need to format whats in the table.

Hard or what

Many thanks

trigg

Posted: Mon Nov 24, 2003 11:02 am
by MudGuard
HTML can't be completely parsed with regexes...

And, Textpad can't use \n in connection with *, +, ? or {}

Select the table by hand, then replace <br> by nothing, setting scope to selected text

Posted: Mon Nov 24, 2003 11:16 am
by triggsley
thanks all