Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
findrx html tags
i am not good in regex (not now), how can i extract the text between:

<!--StartFragment--> and <!--EndFragment--> when using

introtext.getclip("HTML Format") ?

this is my current working result:

[Image: qm2f2b.jpg]

btw. this posting took me over 2 hours, but isn't it nice ?
Copy      Help
str s.getclip("HTML Format")
str ss
if(findrx(s "(?s)(?<=<!--StartFragment-->).+(?=<!--EndFragment-->)" 0 1 ss)<0) ret
lpstr es=curl_escape(ss ss.len); ss=es; curl_free(es)
(?s) - sets "dot matches newline" option
(?<=x) - preceded by x
(?=y) - followed by y
.+ - 1 or more any characters
your code returns:

Copy      Help

why do you use curl for that ?
Generally, http post string should be urlencoded. But if your server accepts non-urlencoded string, delete the last line.

Forum Jump:

Users browsing this thread: 1 Guest(s)