NaviServer - programmable web server

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

# ns_hrefs(n) 4.99.8 naviserver "NaviServer Built-in Commands"

## Name

ns_hrefs - Returns URLs from anchor elements in a chunk of HTML

## Table Of Contents

## Synopsis

- ns_hrefs html

## Description

This command finds the anchor elements in a chunk of HTML, and returns a list of the URLs in those elements' href attributes.

## COMMANDS

ns_hrefs html

## EXAMPLES

       % set html {One good website is <A href='http://google.com/'>Google</A>.
                  Another is <a href='http://www.yahoo.com'>Yahoo!</a>}
       % ns_hrefs $html
       http://google.com/ http://www.yahoo.com