Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exracting Date from string...
#11
Macro Macro1386
Code:
Copy      Help
out
str s=
;http://ccccccccccccc.com/files/jv934rsxb
;http://aaaaaaaa.com/files/389656480/BTh1.rar
;http://aaaaaaaa.com/files/389656484/BTh2.rar
;http://www.bbbbbbbbbbbbbb.com/1910306847/BTh1.rar
;http://ccccccccccccc.com/files/jv9pb90bh
;http://aaaaaaaa.com/files/389656484/BTh3.rar

;sort
ARRAY(str) a=s; a.sort(2); s=a

;if(!s.end("[]")) s+"[]" ;;don't need this if sort

out s.replacerx("^(http://(?:[\w\-]+\.)?(.+?)\.\w+)/.+[](\1/.+[])*" "[box title=$2 class=tborder][]$0[/box][]" 8)
out s

out "---------"
ARRAY(str) hosts="aaaaaaaa[]bbbbbbbbbbbbbb[]ccccccccccccc"
ARRAY(str) hostsTitles="Aaaaaaaa home of Somehing[]Bbbbbbbbbbbbbb - Index[]ccccccccccccc - keeping letters short"
int i
for i 0 hosts.len
,s.findreplace(F" title={hosts[i]} " F" title={hostsTitles[i]} ")

out s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)