Form Actions‎ > ‎

Parsing

Regex


1. add Parsing Regex action on a button
2. add in Input the following:
<a href="http://www.w3schools.com/html/">Visit our HTML tutorial</a>
3. add some text in Parse Data Store in Token: test1
4. add on Regex Pattern: href=[\'"]?([^\'" >]+)
5. add Display Message with [test1]
=> when the button is clicked the message will display: http://www.w3schools.com/html/

Regex - Multiple Results

Store CSV in token


1. add Parsing Regex - Multiple results on a button
2. add in Input the following:
<HEAD> <TITLE>The manual in English</TITLE> <LINK title="The manual in Dutch" type="text/html" rel="alternate" hreflang="nl" href="http://someplace.com/manual/dutch.html"> <LINK title="The manual in Portuguese" type="text/html" rel="alternate" hreflang="pt" href="http://someplace.com/manual/portuguese.html"> <LINK title="The manual in Arabic" type="text/html" rel="alternate" charset="ISO-8859-6" hreflang="ar" href="http://someplace.com/manual/arabic.html"> <LINK lang="fr" title="La documentation en Fran&ccedil;ais" type="text/html" rel="alternate" hreflang="fr" href="http://someplace.com/manual/french.html"> </HEAD>
3. set in Regex Pattern: href=[\'"]?([^\'" >]+)
4. set some text in Store CSV in token, example, test2
5. select , i.e. comma
6. add Display Message and use [test2] in the message body
=> when the submit button is clicked the links from the Input data should be displayed separated by comma

Store XML in token


1. add Parsing Regex - Multiple results on a button
2. add in Input the following:
<HEAD> <TITLE>The manual in English</TITLE> <LINK title="The manual in Dutch" type="text/html" rel="alternate" hreflang="nl" href="http://someplace.com/manual/dutch.html"> <LINK title="The manual in Portuguese" type="text/html" rel="alternate" hreflang="pt" href="http://someplace.com/manual/portuguese.html"> <LINK title="The manual in Arabic" type="text/html" rel="alternate" charset="ISO-8859-6" hreflang="ar" href="http://someplace.com/manual/arabic.html"> <LINK lang="fr" title="La documentation en Fran&ccedil;ais" type="text/html" rel="alternate" hreflang="fr" href="http://someplace.com/manual/french.html"> </HEAD>
3. set in Regex Pattern: href=[\'"]?([^\'" >]+)
4. set some text in Store XML in token, example, test3
5. select , i.e. comma
6. add Display Message and use [test3] in the message body

Store JSON in token


1. add Parsing Regex - Multiple results on a button
2. add in Input the following:
<HEAD> <TITLE>The manual in English</TITLE> <LINK title="The manual in Dutch" type="text/html" rel="alternate" hreflang="nl" href="http://someplace.com/manual/dutch.html"> <LINK title="The manual in Portuguese" type="text/html" rel="alternate" hreflang="pt" href="http://someplace.com/manual/portuguese.html"> <LINK title="The manual in Arabic" type="text/html" rel="alternate" charset="ISO-8859-6" hreflang="ar" href="http://someplace.com/manual/arabic.html"> <LINK lang="fr" title="La documentation en Fran&ccedil;ais" type="text/html" rel="alternate" hreflang="fr" href="http://someplace.com/manual/french.html"> </HEAD>
3. set in Regex Pattern: href=[\'"]?([^\'" >]+)
4. set some text in Store JSON in token, example, test4
5. select , i.e. comma
6. add Display Message and use [test4] in the message body









Do You have a Question? Post it here!

The gadget spec URL could not be found