Url & Email highlighting

Syntax highlighting, code folding, brace matching, code indenting, and function list

Url & Email highlighting

Postby sas2000 » Sun Aug 06, 2006 9:46 am

Hi, is it possible with UltraEdit to highlight Url and Email addresses on Html & plain text files as View64 (text viewer) do on this example ?.
Thanks.
User avatar
sas2000
Newbie
 
Posts: 9
Joined: Sat Aug 05, 2006 11:00 pm

Re: Url & Email highlighting

Postby Mofi » Mon Aug 07, 2006 5:11 am

Not really. If the characters /~.#@:&; are NOT delimiters you can use

** ftp http mailto www

to highlight all strings starting with one of these substrings. But you cannot specify a regular expression to highlight URLs and email addresses.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Url & Email highlighting

Postby sas2000 » Mon Aug 07, 2006 9:52 am

Thanks! I'm a newbie in syntax highlighting but I was able to highlight sentences that start with "ftp http mailto www".

But now the problem is that I need to highlight Email addresses, if it isn't possible to highlight a word that contain @, is it possible for example with myhouse@gmail.com to highlight only @gmail.com or at least @ symbol?

Thanks again.
User avatar
sas2000
Newbie
 
Posts: 9
Joined: Sat Aug 05, 2006 11:00 pm

Re: Url & Email highlighting

Postby Mofi » Mon Aug 07, 2006 12:06 pm

It's not possible to highlight a string which contains @ anywhere in the middle.

You can highlight the first part of the domain name with the @ before with the help of marker characters:

/Marker Characters = "@."
/C2"email addresses"
@.

That would for example result in @gmail.com.

Also possible is the whole domain name, if there is always a space after the address.

/Marker Characters = "@space"
/C2"email addresses"
@space

space is here only a place holder for a singe normal space.

That would for example result in @gmail.com if there is a space following .com or only @gmail.com if no space is following (i.e. line end).

The CR or LF byte cannot be specified as end of marker string.

To get this marker string to work, @ must be in the list of delimiters which of course has a bad effect on the substring highlighting of mailto except you define both at the same color group.

/Marker Characters = "@space"
/C1"URLs"
** ftp http www
/C2"email addresses"
@space
** mailto
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Url & Email highlighting

Postby sas2000 » Mon Aug 07, 2006 5:07 pm

I got myhouse@gmail.com that is good enough for me.

Thank you very much for your help :!: :!: :!: .
User avatar
sas2000
Newbie
 
Posts: 9
Joined: Sat Aug 05, 2006 11:00 pm

Re: Url & Email highlighting

Postby willbe » Wed Jun 09, 2010 3:58 am

Hi, has it been any change in syntax highlighting last years to make possible to highlight Url and Email addresses on Html files? I've found this thread from 2006, but I don't know is is there something new about this.
Thanks in advance.
willbe
Newbie
 
Posts: 1
Joined: Wed Jun 09, 2010 3:41 am

Re: Url & Email highlighting

Postby Mofi » Wed Jun 09, 2010 9:40 am

There are no new features for syntax highlighting implemented in the meantime which would make highlighting url and email addresses better than what is posted here. There is still no support for highlighting strings using (Perl) regular expressions.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Syntax Highlighting

cron