New answers tagged

1 vote

Backronymiser឵឵

Regex (GNU ERE or better), 30 bytes s/(.)(.*( ))(\1)| /$4$3$3$2/ig Try it online! - ECMAScript Try it online! - Perl Try it online! - PCRE1 Try it online! - PCRE2 ...
user avatar
  • 9,290
1 vote

Backronymiser឵឵

Regex (.NET), 69 bytes s/.(?=(.*$)(?<=(?=(?>.*?(.)(?=.* ((?>\3?)(\2))))+\1$)^.*))| .*/$4/img Try it online! - all test cases Try it on regex101! - try it ...
user avatar
  • 9,290
2 votes

Backronymiser឵឵

knight, 68 60 bytes ;;=aP=bP;=j=i 0W<iLa;O I-32-A=cGa i 1A=dGb j 1c;=j+1j d=i+1i Try it online! -8 bytes thanks to Adam for some nice spacing rearrangements In ...
user avatar
  • 28.2k
1 vote

Backronymiser឵឵

C# (Visual C# Compiler), 103 bytes (a,t)=>{for(int i=-1,j=-1;++i<t.Length;)for(;;)if(a[++j]==t[i]){a[j]=(char)(t[i]-32);break;}return a;}; Try it online!
user avatar
3 votes

Backronymiser឵឵

Jelly, 16 bytes ẹⱮŒpI>0PƊƇḢ Œuç¦ Try it online! ...
user avatar
  • 8,726
4 votes

Backronymiser឵឵

Brachylog (v2), 10 bytes ↔{|ụ}ᵐ↔w₆⊇ Try it online! Function submission, using both its arguments (input string on the left, uppercase acronym on the right) and ...
2 votes

Backronymiser឵឵

PHP, 90 bytes function($a,$t,$i=0){foreach(str_split($a)as$c)echo($z=$c^' ')==@$t[$i]?[$z,++$i][0]:$c;}; Simply loops through the characters in the string, and ...
user avatar
5 votes

Backronymiser឵឵

K (ngn/k), 24 bytes -1 byte from @ngn's improvement {`c$x-32*y{y_x,y~:*x}/x} Try it online! Adapted from my answer on the Speed of Lobsters code golf. ...
user avatar
  • 4,843
5 votes

Backronymiser឵឵

Java (JDK), 40 bytes a->t->a.map(c->t.peek()!=c?c:t.pop()^32) Try it online! With a is an ...
user avatar
3 votes

Backronymiser឵឵

K (ngn/k), 36 bytes Takes the string as first argument, then the acronym in lowercase. {@[x;(#x)-1+#'x{y/1_y\x}\y;`c$-;32]} Try it online!
user avatar
  • 54.9k
3 votes

Backronymiser឵឵

Go, 70 bytes func s(a,b[]byte){i:=0;for _,c:=range b{for a[i]-32!=c{i++};a[i]-=32}} Try it online!
user avatar
  • 535
2 votes

Backronymiser឵឵

Lua, 71 bytes a,b=...;j=1;for i=1,#a do x=a[i]-32;if x==b[j]then a[i]=x j=j+1 end end Try it online! Chunk which modifies a in ...
user avatar
  • 535
6 votes

Backronymiser឵឵

J, 49 bytes toupper@[`(0{"1[:(|.~"#:0,2>:/\{."1)^:_[:I.=/)`]} Try it online! This challenge resisted all my attempts to find a short array ...
user avatar
  • 28.2k
3 votes

Backronymiser឵឵

Factor, 55 bytes [ [ over index cut capitalize swap write ] each print ] Try it online! Takes the string and the lowercase word in that order. Assuming the input ...
user avatar
  • 10.6k
4 votes

Backronymiser឵឵

Vyxal, 9 bytes £ƛ¥h=[&Ḣ⇧ Try it Online! Literally is different by one character from this, and also very similar to this. Input as strings, output as char list....
user avatar
  • 8,726
1 vote

Stretching Words

Vyxal s, 9 bytes £ƛ¥h=[&Ḣd Try it Online! ...
user avatar
  • 8,726
4 votes

Backronymiser឵឵

R, 55 54 bytes \(s,t)sapply(s,\(c){if(F<-t[1]%in%c)t<<-t[-1];c-32*F}) Attempt This Online! Input is vector of codepoints. R, 61 bytes ...
user avatar
3 votes

Backronymiser឵឵

Pyth, 15 bytes ?Lqrd4h+Q0.(Q0E Try it online! -- Try with formatted I/O -- Try all test cases Accepts t then ...
user avatar
  • 7,137
7 votes

Backronymiser឵឵

Prolog (SWI), 55 bytes [H|T]+Z+[X|P]:-[H|B]=Z,X is H-32,T+B+P;X=H,(T+Z+P;P=T). Try it online! -33 bytes thanks to Jo King Recursive. Haskell, 44 bytes ...
user avatar
  • 8,726
4 votes

Backronymiser឵឵

Perl 5 -plF , 36 35 bytes saved a byte by taking the first input in upper case ...
user avatar
  • 12.7k
0 votes

Stretching Words

05AB1E, 9 bytes vy?¬yQić? Pretty similar to my 05AB1E answer for two related challenges: Speed of Lobsters and Backronymiser. Try it online or verify all test ...
user avatar
9 votes

Backronymiser឵឵

Python 3.10, 76 73 47 57 51 49 bytes def f(a,t,i=0): for c in t:a[i:=a.find(c,i)]-=32 Attempt This Online Takes in a and ...
user avatar
  • 1,184
3 votes

Backronymiser឵឵

Charcoal, 22 bytes Fη«≔⌕θ↧ιζ…θζι≔Φθ›λζθ»θ Try it online! Link is to verbose version of code. Explanation: Fη« Loop over the ...
user avatar
  • 146k
3 votes

Backronymiser឵឵

05AB1E, 11 bytes v¬yQićuëy}? Based on my 05AB1E answer of the related challenge. Inputs as lowercase strings in the order \$a,t\$. Try it online or verify all test ...
user avatar
6 votes

Backronymiser឵឵

x86-64 machine code, 11 bytes AC AE 75 FD 80 67 FF DF 75 F6 C3 Try it online! Following the standard calling convention for Unix-like systems (from the System V ...
user avatar
  • 7,216
5 votes

Backronymiser឵឵

Retina, 27 bytes i+`(.)(.+)/(\1) $3¶$2/ ¶|/ Takes input separated by /. Try it online!
user avatar
  • 48.5k

Top 50 recent answers are included