05-20-2010, 06:46 PM
Macro Macro1386
\1 matches text of subpattern 1.
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\1 matches text of subpattern 1.
