You are on the right track,

You might need to use several regexps to extract any valid format, then
see if you have anything left.

AFAIK, valid chars would be:

<cfset V = "[A-Za-z0_-]" />

so you check for 1-n V period 1-n V period 1-n V

that takes char of the domain address

from now on you also can have ~/&?%#

If you are doing this client-side, with _javascript_, be aware that
regexps work differently than with CF and with different versions of
_javascript_

If server-side, it is much better to do the cfhttp request, if you can.

Dick

On Jul 2, 2004, at 8:19 PM, Michael T. Tangorre wrote:

> > If you are just scanning text to find any links, just look
>  > for something like:
>  >
>  > 'http://[^ "]*
>
>  Dick, I have a variation of above which checks for http or https
> followed by
>  a : followed by a an optional www followed by any number of letters,
> numbers
>  or periods. I just wanted to make sure I am on the right track
> here....
>  Basically there is a button next to a form element that when clicked,
> takes
>  the link from the form element and opens it in a new window. I want
> to alert
>  the user if the link is malformed.
>
>  Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to