Forums > Jitter

Search/replace comma with jit.str.regexp

July 31, 2011 | 3:16 am

All I need to do is replace commas in an HTML document with periods. I’ve been researching how to do this to no avail. Any ideas? It seems like it would be simple enough, but jit.str.regexp doesn’t seem to like commas very much.

Stranger still: what I currently have worked ONCE, but never again. The error I get is PCRE error -10.

Here’s my patch so far:

– Pasted Max Patch, click to expand. –

Thanks for any help!


July 31, 2011 | 9:19 am

Looks like you’re just using the wrong outlet of [jit.str.regexp]. Try using the second outlet to send out the substitutions (it’s not exactly the same as [regexp] which might be what is confusing you), otherwise the expressions you are using work very well.


July 31, 2011 | 1:34 pm

Oops! You were definitely right about that, thanks for the help! However, when I switched that connection, everything worked once, then stopped working again. Another problem: Jit.uldl is not downloading the entire html file. That, or jit.textfile is somehow not holding the entire document in its buffer. I’m really at a loss here.

Edit: Is it possible it’s failing to download because the HTML uses non-ascii characters? The place names in the document are Icelandic, so there are a lot of accents.

Edit 2: Yes, I have confirmed there is one non-ascii character in there. It’s this: ð. What should I do about this?


July 31, 2011 | 6:03 pm

That might be one to email support about!


July 31, 2011 | 7:34 pm

I actually fixed it. I limited the jit.uldl output values to 0-127 (only english ASCII characters) and everything began working!


Viewing 5 posts - 1 through 5 (of 5 total)