Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

why is there a zwnj?
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) (削除) 157 (削除ここまで) 150 bytes

Saved 10 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l+=y.match(/\w/g).length)?(l=l%2*10+19,""):l.toS‌​tringtoString(36,l=9),l=9).join``+"."

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) (削除) 157 (削除ここまで) 150 bytes

Saved 10 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l+=y.match(/\w/g).length)?(l=l%2*10+19,""):l.toS‌​tring(36,l=9),l=9).join``+"."

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) (削除) 157 (削除ここまで) 150 bytes

Saved 10 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l+=y.match(/\w/g).length)?(l=l%2*10+19,""):l.toString(36,l=9),l=9).join``+"."

Can probably be further improved. Outputs in all lowercase.

golfed 7 bytes thanks to @Neil
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) 157(削除) 157 (削除ここまで) 150 bytes

Saved 310 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l=yl+=y.match(/\w/g).length)?(i=l%2||2l=l%2*10+19,""):(l+i*10+9+(i=0))l.toStringtoS‌​tring(36,l=9),i=0l=9).join``+"."

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) 157 bytes

Saved 3 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l=y.match(/\w/g).length)?(i=l%2||2,""):(l+i*10+9+(i=0)).toString(36),i=0).join``+"."

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) (削除) 157 (削除ここまで) 150 bytes

Saved 10 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l+=y.match(/\w/g).length)?(l=l%2*10+19,""):l.toS‌​tring(36,l=9),l=9).join``+"."

Can probably be further improved. Outputs in all lowercase.

golfed 12 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

JavaScript (ES6), (削除) 172 (削除ここまで) 169(削除) 169 (削除ここまで) 157 bytes

Saved 3 bytes thanks to @Neil

x=>x.replacematch(/([\w'*]+[\w'*]+|\s+/g)[^\w'*\s]* ?.map(y=>y[0]==" "?)[^\w\n*]*/g,(_,y,z)=>y[1]:y==`
`?". ":/\*/.test(y,l=y.match(/\w/g).length)?(i=l%2||2,""):(l+i*10+9+(i=0)).toString(36)+z,i=0).replace(/\n|$/g,"join``+".")

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) 169 bytes

Saved 3 bytes thanks to @Neil

x=>x.replace(/([\w'*]+)[^\w'*\s]* ?( ?)[^\w\n*]*/g,(_,y,z)=>/\*/.test(y,l=y.match(/\w/g).length)?(i=l%2||2,""):(l+i*10+9+(i=0)).toString(36)+z,i=0).replace(/\n|$/g,".")

Can probably be further improved. Outputs in all lowercase.

JavaScript (ES6), (削除) 172 (削除ここまで) (削除) 169 (削除ここまで) 157 bytes

Saved 3 bytes thanks to @Neil

x=>x.match(/[\w'*]+|\s+/g).map(y=>y[0]==" "?y[1]:y==`
`?". ":/\*/.test(y,l=y.match(/\w/g).length)?(i=l%2||2,""):(l+i*10+9+(i=0)).toString(36),i=0).join``+"."

Can probably be further improved. Outputs in all lowercase.

golfed 3 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
Post Undeleted by ETHproductions
bug fix
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
Post Deleted by ETHproductions
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading

AltStyle によって変換されたページ (->オリジナル) /