unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: how would you debug complex regexp searches??
  2003-09-21  1:08 how would you debug complex regexp searches?? gmayer
@ 2003-09-21  0:58 ` Jesper Harder
  2003-09-21 14:29   ` Pascal Bourguignon
  2003-09-22 14:02 ` Gareth Rees
  1 sibling, 1 reply; 4+ messages in thread
From: Jesper Harder @ 2003-09-21  0:58 UTC (permalink / raw)


gmayer@cs.bgu.ac.il writes:

> How would one go about debugging complicated regular expressions? Is
> there some way of single-stepping through a regexp matching, so that
> I can see all the characters that were matched?

're-builder' is quite handy for writing and debugging regexps.

It's bundled with recent versions Emacs -- read the Commentary section
of re-builder.el to learn how to use it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* how would you debug complex regexp searches??
@ 2003-09-21  1:08 gmayer
  2003-09-21  0:58 ` Jesper Harder
  2003-09-22 14:02 ` Gareth Rees
  0 siblings, 2 replies; 4+ messages in thread
From: gmayer @ 2003-09-21  1:08 UTC (permalink / raw)


Hello:

How would one go about debugging complicated regular expressions? Is there
some way of single-stepping through a regexp matching, so that I can see all
the characters that were matched?

Thanks,

Mayer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how would you debug complex regexp searches??
  2003-09-21  0:58 ` Jesper Harder
@ 2003-09-21 14:29   ` Pascal Bourguignon
  0 siblings, 0 replies; 4+ messages in thread
From: Pascal Bourguignon @ 2003-09-21 14:29 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> gmayer@cs.bgu.ac.il writes:
> 
> > How would one go about debugging complicated regular expressions? Is
> > there some way of single-stepping through a regexp matching, so that
> > I can see all the characters that were matched?
> 
> 're-builder' is quite handy for writing and debugging regexps.
> 
> It's bundled with recent versions Emacs -- read the Commentary section
> of re-builder.el to learn how to use it.

Check you antislashes!

-- 
__Pascal_Bourguignon__ http://www.informatimago.com/ Do not adjust
your mind, there is a fault in reality.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how would you debug complex regexp searches??
  2003-09-21  1:08 how would you debug complex regexp searches?? gmayer
  2003-09-21  0:58 ` Jesper Harder
@ 2003-09-22 14:02 ` Gareth Rees
  1 sibling, 0 replies; 4+ messages in thread
From: Gareth Rees @ 2003-09-22 14:02 UTC (permalink / raw)


Mayer wrote:
> How would one go about debugging complicated regular expressions? Is
> there some way of single-stepping through a regexp matching, so that I
> can see all the characters that were matched?

I find `isearch-forward-regexp' (bound to `C-M-s' by default) very
useful when debugging regexps: you can see interactively what each bit
of the regexp matches.

-- 
Gareth Rees

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-22 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-21  1:08 how would you debug complex regexp searches?? gmayer
2003-09-21  0:58 ` Jesper Harder
2003-09-21 14:29   ` Pascal Bourguignon
2003-09-22 14:02 ` Gareth Rees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).