Skip to main content
added 44 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Retina, 29 2626 23 bytes

\\

<
10*10*T
+`^(.*)¶
60*$1
.T

Try it online!Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Edit: Saved 3 bytes with help from @KevinCruijssen. Saved a further 3 bytes thanks to @FryAmTheEggman. Explanation:

\\

Delete the \s are they aren't necessary.

<
10*10*T

Replace each < with 10 _Ts.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.T

TakeCount the length i.e. convert to decimalTs.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

Retina, 29 26 bytes

\\

<
10*
+`^(.*)¶
60*$1
.

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Edit: Saved 3 bytes with help from @KevinCruijssen. Explanation:

\\

Delete the \s are they aren't necessary.

<
10*

Replace each < with 10 _s.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.

Take the length i.e. convert to decimal.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

Retina, 29 26 23 bytes

<
10*T
+`^(.*)¶
60*$1
T

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Edit: Saved 3 bytes with help from @KevinCruijssen. Saved a further 3 bytes thanks to @FryAmTheEggman. Explanation:

<
10*T

Replace each < with 10 Ts.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

T

Count the Ts.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

added 83 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Retina, 2929 26 bytes

\\

<+<
10*$&10*
+`^(.*)¶
60*$1
.

Try it online!Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Edit: Saved 3 bytes with help from @KevinCruijssen. Explanation:

\\

Delete the \s are they aren't necessary.

<+<
10*$&10*

Multiply theReplace each <s by with 10 _s.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.

ConvertTake the length i.e. convert to decimal.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

Retina, 29 bytes

\\

<+
10*$&
+`^(.*)¶
60*$1
.

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

\\

Delete the \s are they aren't necessary.

<+
10*$&

Multiply the <s by 10.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.

Convert to decimal.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

Retina, 29 26 bytes

\\

<
10*
+`^(.*)¶
60*$1
.

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Edit: Saved 3 bytes with help from @KevinCruijssen. Explanation:

\\

Delete the \s are they aren't necessary.

<
10*

Replace each < with 10 _s.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.

Take the length i.e. convert to decimal.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.

Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Retina, 29 bytes

\\

<+
10*$&
+`^(.*)¶
60*$1
.

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

\\

Delete the \s are they aren't necessary.

<+
10*$&

Multiply the <s by 10.

+`^(.*)¶
60*$1

Take the first line, multiply it by 60, and add the next line. Then repeat until there is only one line left.

.

Convert to decimal.

Faster 51-byte version:

%`^(<*)(T*).*
$.(10*$1$2
+`^(.+)¶(.+)
$.($1*60*_$2*

Try it online! Uses newline separation, but link includes header to use spaces instead for convenience. Explanation:

%`^(<*)(T*).*
$.(10*$1$2

Match each line individually, and count the number of Ts and 10 times the number of <s. This converts each line into its base-60 "digit" value.

+`^(.+)¶(.+)
$.($1*60*_$2*

Base 60 conversion, running a line at a time. The computation is done in decimal for speed.