unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs vs. perl => regular expressions
@ 2005-03-02  3:17 Tim Johnson
  2005-03-02  7:51 ` Chong Yidong
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tim Johnson @ 2005-03-02  3:17 UTC (permalink / raw)


Hello:
I just got "Regular Expressions Recipes" by Nathan A. Good.

I'm hoping to use it to learn RE. The book focuses on using
Perl, vim, python and PHP. I would find it helpful if I could
be pointed to documentation that outlines the unique RE features
of emacs (or Xemacs).

That way I could do the exercises in emacs also. I think that
would be very helpful in learning RE for emacs.

Is such documentation available? Any suggestions?
TIA
tim

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

* Re: emacs vs. perl => regular expressions
  2005-03-02  3:17 emacs vs. perl => regular expressions Tim Johnson
@ 2005-03-02  7:51 ` Chong Yidong
  2005-03-02  9:17 ` Reiner Steib
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2005-03-02  7:51 UTC (permalink / raw)


Tim Johnson <tim@johnsons-web.com> writes:

> I'm hoping to use it to learn RE. The book focuses on using
> Perl, vim, python and PHP. I would find it helpful if I could
> be pointed to documentation that outlines the unique RE features
> of emacs (or Xemacs).
> 
> That way I could do the exercises in emacs also. I think that
> would be very helpful in learning RE for emacs.

See the Regular Expressions section, in the chapter "Searching and
Matching" of the Emacs Lisp Reference Manual.

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

* Re: emacs vs. perl => regular expressions
  2005-03-02  3:17 emacs vs. perl => regular expressions Tim Johnson
  2005-03-02  7:51 ` Chong Yidong
@ 2005-03-02  9:17 ` Reiner Steib
  2005-03-03  7:55   ` Steinar Børmer
  2005-03-02 18:02 ` Drew Adams
  2005-03-02 21:28 ` Peter Lee
  3 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2005-03-02  9:17 UTC (permalink / raw)


On Wed, Mar 02 2005, Tim Johnson wrote:

> I just got "Regular Expressions Recipes" by Nathan A. Good.
>
> I'm hoping to use it to learn RE. The book focuses on using
> Perl, vim, python and PHP. I would find it helpful if I could
> be pointed to documentation that outlines the unique RE features
> of emacs (or Xemacs).
>
> That way I could do the exercises in emacs also. I think that
> would be very helpful in learning RE for emacs.
>
> Is such documentation available? Any suggestions?

The Emacs Manual and the Emacs Lisp Reference Manual describe the
syntax of regular expressions *in Emacs*, but _not_ the differences to
Perl REs, ...

,----[ (info "(emacs)Regexps") ]
| Syntax of Regular Expressions
| 
| This manual describes regular expression features that users typically
| want to use.  There are additional features that are mainly used in
| Lisp programs; see *Note Regular Expressions: (elisp)Regular
| Expressions.
`----

(info "(emacs)Regexps"); <== Press C-x C-e here!
(info "(elisp)Regular Expressions"); <== Press C-x C-e here!

Probably also useful: `M-x re-builder RET'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* RE: emacs vs. perl => regular expressions
  2005-03-02  3:17 emacs vs. perl => regular expressions Tim Johnson
  2005-03-02  7:51 ` Chong Yidong
  2005-03-02  9:17 ` Reiner Steib
@ 2005-03-02 18:02 ` Drew Adams
  2005-03-02 21:28 ` Peter Lee
  3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2005-03-02 18:02 UTC (permalink / raw)


    I just got "Regular Expressions Recipes" by Nathan A. Good.
    I'm hoping to use it to learn RE. The book focuses on using
    Perl, vim, python and PHP. I would find it helpful if I could
    be pointed to documentation that outlines the unique RE features
    of emacs (or Xemacs).
    That way I could do the exercises in emacs also. I think that
    would be very helpful in learning RE for emacs.
    Is such documentation available? Any suggestions?

The _best_ book on regexes, with extensive comparisons between Perl, Emacs,
and other regex flavors: http://www.oreilly.com/catalog/regex/. - Drew

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

* Re: emacs vs. perl => regular expressions
  2005-03-02  3:17 emacs vs. perl => regular expressions Tim Johnson
                   ` (2 preceding siblings ...)
  2005-03-02 18:02 ` Drew Adams
@ 2005-03-02 21:28 ` Peter Lee
  3 siblings, 0 replies; 9+ messages in thread
From: Peter Lee @ 2005-03-02 21:28 UTC (permalink / raw)


>>>> Tim Johnson writes:

    Tim> I would find it helpful if I could
    Tim> be pointed to documentation that outlines the unique RE features
    Tim> of emacs (or Xemacs).

The following might be helpful... it doesn't list the versions used in
the comparisons, but then I'm not sure how much regex has changed in
emacs over the years.

http://www.greenend.org.uk/rjk/2002/06/regexp.html

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

* Re: emacs vs. perl => regular expressions
  2005-03-02  9:17 ` Reiner Steib
@ 2005-03-03  7:55   ` Steinar Børmer
  2005-03-03 11:20     ` Reiner Steib
  0 siblings, 1 reply; 9+ messages in thread
From: Steinar Børmer @ 2005-03-03  7:55 UTC (permalink / raw)


Reiner Steib wrote:

| (info "(emacs)Regexps"); <== Press C-x C-e here!
| (info "(elisp)Regular Expressions"); <== Press C-x C-e here!

In No Gnus v0.3 and v0.2 you can also press RET when point is somewhere
within the parenteses (which are highlighted), or mouse-1 or mouse-2.

This does not work in Gnus 5.9.0.  Not sure when this feature appeared.

-- 
SB

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

* Re: emacs vs. perl => regular expressions
  2005-03-03  7:55   ` Steinar Børmer
@ 2005-03-03 11:20     ` Reiner Steib
  2005-03-03 14:29       ` Steinar Børmer
  2005-03-03 16:33       ` Tim Johnson
  0 siblings, 2 replies; 9+ messages in thread
From: Reiner Steib @ 2005-03-03 11:20 UTC (permalink / raw)


On Thu, Mar 03 2005, Steinar Børmer wrote:

> Reiner Steib wrote:
>
> | (info "(emacs)Regexps"); <== Press C-x C-e here!
> | (info "(elisp)Regular Expressions"); <== Press C-x C-e here!
>
> In No Gnus v0.3 and v0.2 you can also press RET when point is somewhere
> within the parenteses (which are highlighted), or mouse-1 or mouse-2.

I am well aware of this feature, see below. ;-)  But Tim doesn't seem
to use Gnus, so I inserted the version with the hint.

> This does not work in Gnus 5.9.0.  Not sure when this feature appeared.

It first appeared in Oort Gnus v0.18:

,----[ lisp/ChangeLog.2 ]
| 2003-03-31  Reiner Steib  <Reiner.Steib@gmx.de>
| 
| 	* gnus-art.el (gnus-button-valid-fqdn-regexp): Use
| 	`message-valid-fqdn-regexp' for initialization.
| 	(gnus-button-handle-info-url): Renamed and extended version of
| 	`gnus-button-handle-info'.   [...]
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: emacs vs. perl => regular expressions
  2005-03-03 11:20     ` Reiner Steib
@ 2005-03-03 14:29       ` Steinar Børmer
  2005-03-03 16:33       ` Tim Johnson
  1 sibling, 0 replies; 9+ messages in thread
From: Steinar Børmer @ 2005-03-03 14:29 UTC (permalink / raw)


Reiner Steib wrote:

| On Thu, Mar 03 2005, Steinar Børmer wrote:
| 
| > Reiner Steib wrote:
| >
| > | (info "(emacs)Regexps"); <== Press C-x C-e here!
| > | (info "(elisp)Regular Expressions"); <== Press C-x C-e here!
| >
| > In No Gnus v0.3 and v0.2 you can also press RET when point is
| > somewhere within the parenteses (which are highlighted), or mouse-1
| > or mouse-2.
| 
| I am well aware of this feature, see below. ;-)

Oh.  You most certainly are.  =)

| But Tim doesn't seem to use Gnus, so I inserted the version with the
| hint.

Yes, I see.

It's a good feature, very much the kind of development Gnus needs.
Thanks.

-- 
SB

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

* Re: emacs vs. perl => regular expressions
  2005-03-03 11:20     ` Reiner Steib
  2005-03-03 14:29       ` Steinar Børmer
@ 2005-03-03 16:33       ` Tim Johnson
  1 sibling, 0 replies; 9+ messages in thread
From: Tim Johnson @ 2005-03-03 16:33 UTC (permalink / raw)


Reiner Steib wrote:
> On Thu, Mar 03 2005, Steinar Børmer wrote:
> 
> 
>>Reiner Steib wrote:
>>
>>| (info "(emacs)Regexps"); <== Press C-x C-e here!
>>| (info "(elisp)Regular Expressions"); <== Press C-x C-e here!
>>
>>In No Gnus v0.3 and v0.2 you can also press RET when point is somewhere
>>within the parenteses (which are highlighted), or mouse-1 or mouse-2.
> 
> 
> I am well aware of this feature, see below. ;-)  But Tim doesn't seem
> to use Gnus, so I inserted the version with the hint.

:-) The hint wasn't lost on me. I'm temporarily exiled to windows XP and
using netscape as a short-term fix. I use mutt on linux and am very 
happy with it, but having a business, maximum customization is appealing 
- so stayed tuned on gnus. I sure appreciate all the regex input,
thanks a lot.

BTW: Any good tutorials available for Gnus? (Just subscribed to the 
newsgroup)
cheers
tim
> 
>>This does not work in Gnus 5.9.0.  Not sure when this feature appeared.
> 
> 
> It first appeared in Oort Gnus v0.18:
> 
> ,----[ lisp/ChangeLog.2 ]
> | 2003-03-31  Reiner Steib  <Reiner.Steib@gmx.de>
> | 
> | 	* gnus-art.el (gnus-button-valid-fqdn-regexp): Use
> | 	`message-valid-fqdn-regexp' for initialization.
> | 	(gnus-button-handle-info-url): Renamed and extended version of
> | 	`gnus-button-handle-info'.   [...]
> `----
> 
> Bye, Reiner.

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

end of thread, other threads:[~2005-03-03 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-02  3:17 emacs vs. perl => regular expressions Tim Johnson
2005-03-02  7:51 ` Chong Yidong
2005-03-02  9:17 ` Reiner Steib
2005-03-03  7:55   ` Steinar Børmer
2005-03-03 11:20     ` Reiner Steib
2005-03-03 14:29       ` Steinar Børmer
2005-03-03 16:33       ` Tim Johnson
2005-03-02 18:02 ` Drew Adams
2005-03-02 21:28 ` Peter Lee

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).