File: regex.lua

package info (click to toggle)
luabind 0.9.1%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,844 kB
  • ctags: 2,833
  • sloc: cpp: 13,796; makefile: 126; sh: 24; ansic: 11
file content (12 lines) | stat: -rw-r--r-- 235 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12

html_tag = regex("<(.*?)>")
src = '<html>dadas<head>dsa</head></html>'

while html_tag:search(src) do
	print('tag: ' .. html_tag:what(1))
	src = string.sub(src, html_tag:position(0) + html_tag:length(0))
end

print('-------------')