Uiua SBCS , 32(削除) 32 (削除ここまで) 31 bytes
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±⌵±.
-1 thanks to noodle man!
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±⌵±.
. # duplicate
<0±⌵± # mask of letters
⍜⊜□しろいしかく( ) # apply function to each contiguous mask group
∵◇⧻ # lengths
◿10 # modulo ten
°⋕ # unparse
. # duplicate
≥@0 # mask of digits
⊗@., # index of first period
⍜⊡¬ # negate at index
⬚0 # filling with zero if no period found
▽ # keep characters given mask
⋕ # parse to number, removing leading and trailing zeros
💎
Created with the help of Luminespire.
Uiua SBCS , 32 bytes
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±.
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±.
. # duplicate
<0± # mask of letters
⍜⊜□しろいしかく( ) # apply function to each contiguous mask group
∵◇⧻ # lengths
◿10 # modulo ten
°⋕ # unparse
. # duplicate
≥@0 # mask of digits
⊗@., # index of first period
⍜⊡¬ # negate at index
⬚0 # filling with zero if no period found
▽ # keep characters given mask
⋕ # parse to number, removing leading and trailing zeros
💎
Created with the help of Luminespire.
Uiua SBCS , (削除) 32 (削除ここまで) 31 bytes
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)⌵±.
-1 thanks to noodle man!
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)⌵±.
. # duplicate
⌵± # mask of letters
⍜⊜□しろいしかく( ) # apply function to each contiguous mask group
∵◇⧻ # lengths
◿10 # modulo ten
°⋕ # unparse
. # duplicate
≥@0 # mask of digits
⊗@., # index of first period
⍜⊡¬ # negate at index
⬚0 # filling with zero if no period found
▽ # keep characters given mask
⋕ # parse to number, removing leading and trailing zeros
💎
Created with the help of Luminespire.
Uiua SBCS , 32 bytes
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±.
⋕▽⬚0⍜⊡¬⊗@.,≥@0.⍜⊜□しろいしかく(°⋕◿10∵◇⧻)<0±.
. # duplicate
<0± # mask of letters
⍜⊜□しろいしかく( ) # apply function to each contiguous mask group
∵◇⧻ # lengths
◿10 # modulo ten
°⋕ # unparse
. # duplicate
≥@0 # mask of digits
⊗@., # index of first period
⍜⊡¬ # negate at index
⬚0 # filling with zero if no period found
▽ # keep characters given mask
⋕ # parse to number, removing leading and trailing zeros
💎
Created with the help of Luminespire.