Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat<<_|grep -o 'x=.*>'|cut -c4-|sort -n|grep -o '>.</t'|cut -c2
- grep -o 'x=.*>'|cut -c4-|sort -n|grep -o '>.</t'|cut -c2
- <?xml...
- </svg>
- _
- q"x="/2>{'"/1=i}${'>/1=c}/
- q e# Read all input from STDIN.
- "x="/ e# Split it at occurrences of "x=".
- 2> e# Discard the first two chunks (head and container).
- { e# Sort the remaining chunks by the following key:
- '"/ e# Split at occurrences of '"'.
- 1= e# Select the second chunk (digits of x="<digits>").
- i e# Cast to integer.
- }$ e#
- { e# For each of the sorted chunks:
- '>/ e# Split at occurrences of '>'.
- 1= e# Select the second chunk.
- c e# Cast to character.
- }/ e#
- l=[],r=/x="(d*).*>(.)/g;while(e=r.exec(document.lastChild.innerHTML))l[e[1]]=e[2];l.join``
- import re,sys
- print''.join(t[1] for t in sorted(re.findall(r'(d+), -d+)">(.)</t',sys.stdin.read()),key=lambda t:int(t[0])))
- ""<>(v=ImportString[#~StringDrop~157,"XML"][[2,3,4;;;;2]])[[;;,3]][[Ordering[FromDigits/@v[[;;,2,2,2]]]]]&
Add Comment
Please, Sign In to add comment