Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
13
Task/Substring/Ed/substring.ed
Normal file
13
Task/Substring/Ed/substring.ed
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# by Artyom Bologov
|
||||
H
|
||||
t0
|
||||
t0
|
||||
t0
|
||||
t0
|
||||
1s/..\(.\{2\}\).*/\1/
|
||||
2s/..\(.*\)/\1/
|
||||
3s/.$//
|
||||
4s/.*\(c.\{2\}\).*/\1/
|
||||
5s/.*\(cd.\{3\}\).*/\1/
|
||||
,p
|
||||
Q
|
||||
37
Task/Substring/OmniMark/substring.xom
Normal file
37
Task/Substring/OmniMark/substring.xom
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
macro utf8-char is
|
||||
(["%16r{00}" to "%16r{7F}"] |
|
||||
["%16r{C0}" to "%16r{DF}"] ["%16r{80}" to "%16r{BF}"] |
|
||||
["%16r{E0}" to "%16r{EF}"] ["%16r{80}" to "%16r{BF}"] {2} |
|
||||
["%16r{F0}" to "%16r{F7}"] ["%16r{80}" to "%16r{BF}"] {3}) macro-end
|
||||
|
||||
process
|
||||
local stream s initial {'This 𝓲𝓼 the 𝓞𝓶𝓷𝓲𝓜𝓪𝓻𝓴 solution.'}
|
||||
using group StartingFrom_n_CharactersInAndOf_m_Length submit s
|
||||
using group StartingFrom_n_charactersInUpToTheEndOfTheString submit s
|
||||
using group WholeStringMinusTheLastCharacter submit s
|
||||
using group StartingFromKnownCharacterAndOf_m_Length submit s
|
||||
using group StartingFromKnownSubstringAndOf_m_Length submit s
|
||||
|
||||
group StartingFrom_n_CharactersInAndOf_m_Length
|
||||
find value-start utf8-char{12} utf8-char{8} => p
|
||||
output p || '%n' ; outputs characters 13 to 20: 𝓞𝓶𝓷𝓲𝓜𝓪𝓻𝓴
|
||||
|
||||
group StartingFrom_n_charactersInUpToTheEndOfTheString
|
||||
find value-start utf8-char{12} utf8-char+ => p
|
||||
output p || '%n' ; outputs characters 13 to last: 𝓞𝓶𝓷𝓲𝓜𝓪𝓻𝓴 solution.
|
||||
|
||||
group WholeStringMinusTheLastCharacter
|
||||
find value-start ((lookahead not (utf8-char value-end)) utf8-char)+ => p
|
||||
output p || '%n' ; outputs characters 1 to (last - 1), so without the .
|
||||
|
||||
group StartingFromKnownCharacterAndOf_m_Length
|
||||
find 'T' utf8-char{3} => p
|
||||
output p || '%n' ; outputs his following T
|
||||
|
||||
group StartingFromKnownSubstringAndOf_m_Length
|
||||
find '𝓞𝓶𝓷𝓲𝓜' utf8-char{3} => p
|
||||
output p || '%n' ; outputs 𝓪𝓻𝓴 following 𝓞𝓶𝓷𝓲𝓜
|
||||
|
||||
group #implied
|
||||
find utf8-char
|
||||
; ensures no other characters go to the output
|
||||
Loading…
Add table
Add a link
Reference in a new issue