[plt-scheme] Re: plt-scheme Digest, Vol 11, Issue 38

From: Matt Jadud (mcj4 at kent.ac.uk)
Date: Mon Jul 17 04:02:20 EDT 2006

You're right; it is an escape character.

(pregexp-split "\\\\" S)

should work better, I think. It splits your string into

("" "x0A1,76.23,179000" "x0A2,76.12,53000" "x0A3,76.10,107500")

as a result.

Cheers,
M

geb a wrote:
> Sorry to bother the group with such a trivial question
> but I am having trouble splitting the string below
> using pregexp...
> 
> 
> (define S
> "\\x0A1,76.23,179000\\x0A2,76.12,53000\\x0A3,76.10,107500\\")
> 
> (pregexp-split "\\" S)  since the \\ is an escape char
> it won't split and I'm having trouble finding the
> proper sequence of chars...  
> 
> Thanks for your trouble!
> 
> Dan
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.