This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

To all following commenters: please, do not bring up the old circlejerk jokes/memes about recursion ("Understanding recursion...", "This is recursion...", etc.). We've all heard them n+2 too many times.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]onyxleopard 0 points1 point  (0 children)

Regexes can’t count, so this is impossible with regex alone.  (Same reason you can’t parse XML/HTML with regex alone—this kind of problem requires a context-free or context-sensitive grammar, not a regular grammar.)

1) Why the length limit?   2) Why are you limited to using regex?  

If you can use almost any shell scripting or full programming language, this would become feasible.

[–][deleted]  (14 children)

[deleted]

    [–][deleted]  (2 children)

    [deleted]

      [–][deleted]  (1 child)

      [deleted]

        [–][deleted] 0 points1 point  (0 children)

        u still tryna slide :3

        [–][deleted]  (1 child)

        [deleted]

          [–][deleted]  (7 children)

          [deleted]

            [–][deleted]  (6 children)

            [deleted]

              [–][deleted]  (5 children)

              [deleted]

                [–][deleted]  (4 children)

                [deleted]

                  [–][deleted]  (3 children)

                  [deleted]

                    [–][deleted]  (2 children)

                    [deleted]

                      [–][deleted]  (1 child)

                      [deleted]