On Thu, 09 Apr 2009 20:48:11 +0100, Dale Amon wrote:
> This finds nothing:
...
> DEC029 = re.compile("[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!);\\\]%_>?]")
> This works correctly:
...
> DEC029 = re.compile("[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!)\\;\]%_>?]")
> They differ only in the positioning of th
Peter Otten wrote:
Dale Amon wrote:
This finds nothing:
import re
import string
card = "abcdef"
DEC029 = re.compile("[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!);\\\]%_>?]")
The regular expression you're actually providing is:
>>> print "[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!);\\\]%_>?]"
[^&0-9A-Z/
Dale Amon wrote:
> This finds nothing:
>
> import re
> import string
> card = "abcdef"
> DEC029 = re.compile("[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!);\\\]%_>?]")
> errs = DEC029.findall(card.strip("\n\r"))
> print errs
>
> This works correctly:
>
> import re
> import string
> card
This finds nothing:
import re
import string
card = "abcdef"
DEC029 = re.compile("[^&0-9A-Z/ $*,.\-:#@'=\"[<(+\^!);\\\]%_>?]")
errs = DEC029.findall(card.strip("\n\r"))
print errs
This works correctly:
import re
import string
card = "abcdef"
DEC029 = re.compile("[^&0-9A-