Skip to main content
added 29 characters in body
Source Link
Giuseppe
  • 29.4k
  • 3
  • 33
  • 106

SNOBOL4 (CSNOBOL4), 5863 bytes

	I =INPUT R	I LEN(1) $. X 	I X X =	:S(R) 	OUTPUT =IDENT(I) 1 END 

Try it online!Try it online!

Matches the first character LEN(1) and saves it with immediate assignment $. to X and. If I matches another X concatenated with itself, replacing it with nothingreplaces that substring and repeats. If the match succeeded, this step repeats; if the remaining string is empty, IDENT(I,<implicit empty string>), then 1 is output, else nothing is output.

SNOBOL4 (CSNOBOL4), 58 bytes

	I =INPUT R	I LEN(1) $ X X =	:S(R) 	OUTPUT =IDENT(I) 1 END 

Try it online!

Matches the first character LEN(1) and saves it with immediate assignment $ to X and matches another X, replacing it with nothing. If the match succeeded, this step repeats; if the remaining string is empty, IDENT(I,<implicit empty string>), then 1 is output, else nothing is output.

SNOBOL4 (CSNOBOL4), 63 bytes

	I =INPUT R	I LEN(1) . X 	I X X =	:S(R) 	OUTPUT =IDENT(I) 1 END 

Try it online!

Matches the first character LEN(1) and saves it . to X. If I matches X concatenated with itself, it replaces that substring and repeats. If the remaining string is empty, IDENT(I,<implicit empty string>), then 1 is output, else nothing is output.

Post Undeleted by Giuseppe
Post Deleted by Giuseppe
Source Link
Giuseppe
  • 29.4k
  • 3
  • 33
  • 106

SNOBOL4 (CSNOBOL4), 58 bytes

	I =INPUT R	I LEN(1) $ X X =	:S(R) 	OUTPUT =IDENT(I) 1 END 

Try it online!

Matches the first character LEN(1) and saves it with immediate assignment $ to X and matches another X, replacing it with nothing. If the match succeeded, this step repeats; if the remaining string is empty, IDENT(I,<implicit empty string>), then 1 is output, else nothing is output.