Loading ...
Sorry, an error occurred while loading the content.

45655RE: Regexp help

Expand Messages
  • John Aldridge
    Dec 2, 2003
    • 0 Attachment
      At 22:30 12-01-2003, Srinath Avadhanula wrote:

      >Hi Jonah,
      >On Tue, 2 Dec 2003, jonah wrote:
      > > The general problem cannot be solved with regular expressions.
      > >
      > > See, eg,
      > http://science.slc.edu/~msiff/old-courses/compilers/notes/parse.html
      > >
      > > It is possible that vim's extended regular expression support
      > offers some way to
      > > do it, but I doubt it.
      >Thanks for the answer. It was quite an eye-opener to know that
      >parentheses balancing is unsolvable using regexps! On further googling,
      >it looks like none of the common regexp engines can actually do this...

      For my curiosity, what were you hoping to do with such regexes?
      Do you think you'll attempt a scripting solution?

      I like to tinker with parsers, and I have some working, although buggy,
      Vim scripts that do parenthesis counting. One of these days, I
      might also take the time to dig into matchit.vim and have a look
      at how that works.

      "John R. Aldridge, Jr."
    • Show all 15 messages in this topic