Hacker News new | ask | show | jobs
by sacado2 2189 days ago
> This doesn't make sense. How can you search for a string if you're already in a string? I can't think of a realistic situation where that would be useful or even really possible.

    query = "select * from table where name like \"%foo\""
1 comments

Interesting. Although in that situation I think it would be easier to find the outer string, then unescape it, then find the inner string.

Although if you want to do it with pure regex, it can be done without backreferences too, although it would be exponentially large as you get more and more levels of nesting, whereas with backreferences I think it would only get quadratically large.