On Sat, Sep 27, 2008 at 1:58 PM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> [EMAIL PROTECTED] wrote:
>
> import re
>>
>> fd = open(file, 'r')
>> line = fd.readline
>> pat1 = re.compile("\#*")
>>while(line):
>>mat1 = pat1.search(line)
>>if mat1:
>>
[EMAIL PROTECTED] wrote:
import re
fd = open(file, 'r')
line = fd.readline
pat1 = re.compile("\#*")
while(line):
mat1 = pat1.search(line)
if mat1:
print line
line = fd.readline()
I strongly doubt that this is
Hi,
Can some help me with the regular expression. I'm looking to search #
character in my file?
My file has contents:
###
Hello World
###
length = 10
breadth = 20
height = 30
###
##