[olug] Regex question

Christopher Cashell topher-olug at zyp.org
Tue Oct 10 02:57:10 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At Mon, 09 Oct 06, Unidentified Flying Banana Adam Haeder, said:
> But the same regex _does not_ work when passed to sed.
> 
> What am I doing wrong?

Try:

  sed 's/\d226/-/'

This tells sed to replace the ASCII character represented by dDDD
(decimal DDD) with a dash.  Alternately, you can use xXX (hex) or oOOO
(octal), as well.

Should work for GNU sed, at least.

> --
> Adam Haeder

- -- 
| Christopher
+------------------------------------------------+
| Here I stand.  I can do no other.              |
+------------------------------------------------+

-----BEGIN PGP SIGNATURE-----

iD8DBQFFKwwGEhJxA932ZEYRAu9zAKC7CoQ0F2peVPdiZh+NNU+Pk/4oaQCcD8pB
hg7boTnJTq2nqjr6i/VTIS4=
=hmJX
-----END PGP SIGNATURE-----



More information about the OLUG mailing list