Re: Tex-Edit, select only HTML lines?
Re: Tex-Edit, select only HTML lines?
- Subject: Re: Tex-Edit, select only HTML lines?
- From: Timothy Bates <email@hidden>
- Date: Mon, 03 Sep 2001 00:00:38 +1000
On 9/2/01 11:30 PM, "Rachel" <email@hidden> wrote:
>
1:
>
I said: "if character 1 of line i is "<" then" and this works
>
but "if word 1 of line i is "<a" does not work.
"<a" is not a word
>
and "if character 1 thru 2 of line i is "<a" does not work.
character 1 thru 2 is a list of characters {"<","a"}
try:
text 1 thru 2
>
2:
>
I said: "replace selection looking for ">^*<" replacing with "^*"
>
replacing with styles {color:blue}"
>
however I do not want to color the ">" and "<" characters. How do I select
>
only the text between them?
tex-edit is pretty hopeless at this because it does not support grep - so
you can't pull out parts of a find
In grep you would say (<)([^>]*)(>) and get these three things separately.
Of course grep is not very understanding of styled text :-)
So, don't use the find replace metaphor (even though it is way quick).
Instead, you can work through the text as a string of objects. BUT, if your
goal is to colorize html, I recommend using Pepper (a text editor which does
this instantly as a matter of course (as well as genuine state-machine based
syntax highlighting in almost any ocmptuer language).
www.hekkelman.com
Or, if you want to stay with Tex-Edit (which a fantastic app across the
board) then check out the example colorize script that comes with Tex-Edit:
it solves your "things inside angle brackets> needs.