Text between: Difference between revisions

m
(Added AutoHotkey)
Line 409:
for i, line in StrSplit(data, "`n", "`r")
x := StrSplit(line, "|")
, result .= "text: """ x.1 """`nstart: """ x.2 """`tend: """ x.3 """`noutput: """ textBetween(x.1, x.2, x.3) """`n----`n"
MsgBox, 262144, , % result
return
Line 418:
}</lang>
{{out}}
<pre>text: "Hello Rosetta Code world"
start: "Hello " end: " world"
output: "Rosetta Code"
----
text: "Hello Rosetta Code world"
start: "start" end: " world"
output: "Hello Rosetta Code"
----
text: "Hello Rosetta Code world"
start: "Hello " end: "end"
output: "Rosetta Code world"
----
text: "</div><div style=\"chinese\">你好嗎</div>"
start: "<div style=\"chinese\">" end: "</div>"
output: "你好嗎"
----
text: "<text>Hello <span>Rosetta Code</span> world</text><table style=\"myTable\">"
start: "<text>" end: "<table>"
output: "Hello <span>Rosetta Code</span> world</text>"
----
text: "<text>Hello <span>Rosetta Code</span> world</text><table style=\"myTable\">"
start: "<table>" end: "</table>"
output: ""
----
text: "The quick brown fox jumps over the lazy other fox"
start: "quick " end: " fox"
output: "brown"
----
text: "One fish two fish red fish blue fish"
start: "fish " end: " red"
output: "two fish"
----
text: "FooBarBazFooBuxQuux"
start: "Foo" end: "Foo"
output: "BarBaz"
----</pre>
 
299

edits