28
Asbetha
6y

I heared you like regular expressions

Comments
  • 14
    sorry 4 the tiny snippet :/
  • 9
    How many unit test does it take to fully test that regex?
  • 6
  • 0
    For what is that used?
  • 3
    I'd say it's looking for inline JavaScript tags, I guess something like this maybe?

    <whatever><!--[[

    function whatever(something)

    ]]--></whatever>

    Anyway, there are strange constructs in that regex, like using {0,} instead of *, or using square brackets as if they were group capturing delimiters, like using [[[<|<] instead of (\[\[<|<).

    I don't know, I might be completely missing the point of that regex, though.
  • 3
    Nah I'm parsing through a LUA script file which contains comments that have a similar structure like xml but it isn't really xml
  • 1
    Oops I forgot to bring my microscope :D
  • 3
    Can't even touch it on my phone 😂
  • 0
    @Asbetha your response was better than the OP.
  • 3
    Here’s my best attempt at reading bad attachment
  • 3
    @BM32 it looked so good with the snipping tool :c

    @cjbatz & @dontPanic I have something round about 100 unit tests for that ... because if it doesn't work anymore ... I'm pretty f...ed :D
  • 0
    This is what gives me nightmares. Thank god that Django came out with an easier system in 2.0
Add Comment