Lasso Soft Inc. > Home


AuthorJonathan Guthrie
LicensePublic Domain
Posted20 Dec 2010
Updated20 Dec 2010
More by this author...


Parses a string for links to make clickable links.

Based on the RegExp published at


Accepts an optional keyword parameter "newWindow" that inserts _target="blank" if true. The default value is false.

Sample Usage

LEAP_makeLink('Visit every day!') 
LEAP_makeLink('Visit every day!',-newWindow=true) 

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define LEAP_makeLink(x::string,-newWindow::boolean=false) => {
	// ref
	#x = string(string_replaceregexp(
	if(#newWindow) => {
		#x->replace('|XX|',' target="_blank"')
	return #x


16 May 2014, ram marr

Thank you

Thanks for this it saved me time, make sure you copy the complete code or it will not work, i erased mine also





19 Sep 2011, Bryce Smith

Simplify the target="_blank"

this code saved me a lot of time.

SEO Services Providence, RI

27 Jan 2011, Brad Lindsay

Simplify the target="_blank"

Hmmm. It erased my code...

In place of the |XX| in the -replace= you can concatenate in the following:

(#newWindow ? 'target="blank"' | '')

27 Jan 2011, Brad Lindsay

Simplify the target="_blank"

You can simplify the code by not using the |XX| and instead put the logic for it there. In other words, the -replace= could look like this:


Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft