incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Bartell <snbart...@gmail.com>
Subject Re: storing regex in json
Date Sat, 19 Jan 2013 00:43:30 GMT
Like you guys said, escaping backslashes is how you put regex into json.

My problem was that in the real world, the data going into my function was not the type i
expected.  So my function kept throwing.  It worked great in my cute little tests, but burned
in production.

Thanks for the help,
sb

On Jan 18, 2013, at 3:09 PM, Jens Alfke <jens@couchbase.com> wrote:

> 
> On Jan 18, 2013, at 2:57 PM, Mark Hahn <mark@hahnca.com> wrote:
> 
>> Have you tried \\ instead of \ ?
> 
> +1. When quoting text for JavaScript or JSON, you have to escape any backslashes in the
text.
> 
> —Jens


Mime
View raw message