[Q] How to search the back slash?

Thomas Kwong (tomkwong@discover.uucp)
27 Jan 1995 23:55:02 GMT

Hi. Can someone please tell me how to search the string
'\\' (one back slash after metachar substituion)? I got
the following result:

tomkwong-bash$ python
Python 1.1 (Jan 5 1995)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> import regex
>>> regex.compile('\\')
Traceback (innermost last):
File "<stdin>", line 1, in ?
regex.error: Regular expression ends prematurel <=== oops
>>> regex.compile('\n')
<regex object at 418f44> <=== ok

Thanks.

Tom

--
********************************************************************
* tomkwong@wilshire.com --- Wilshire Associates, Inc.              *
*   Please take a look at my WWW home page for my favorite links:  *
*   ftp://ftp.netcom.com/pub/tomkwong/home.html                    *
********************************************************************