On Mon, Aug 16, 2004 at 05:16:46PM +1000, Jamie Wilkinson wrote: > This one time, at band camp, Alexander Samad wrote: > >On Mon, Aug 16, 2004 at 04:52:40PM +1000, John Clarke wrote: > >> On Mon, Aug 16, 2004 at 04:42:40PM +1000, Alexander Samad wrote: > >> > >> > echo "01 02" | sed -ne 's/\(\d*\) \(\d*\)/\2 \1/p' > >> > > >> > but it doesn't print out 02 01, if I change \d for \w I do get 02 01, > >> > >> Try changing '\d' to '[0-9]'. > > > >okay that worked, but why ? I thought \d was any digit, do I need to > >escape of the \ to \\d ? > > sed doesn't speak perl regexes
This is what i got from man sed
REGULAR EXPRESSIONS
POSIX.2 BREs should be supported, but they aren't completely
because of performance prob-
lems. The \n sequence in a regular expression matches the
newline character, and simi-
larly for \a, \t, and other sequences.
took that to mean it also understood \d
>
> --
> [EMAIL PROTECTED] http://spacepants.org/jaq.gpg
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
signature.asc
Description: Digital signature
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
