Search/replace comma with jit.str.regexp
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:
----------begin_max5_patcher---------- 764.3ocyX00biBBE8YyuBFeZ2YxZDPLa5Sc+cramNZjFoiht.tMc6z+6qBw1 7Qchk3xj7.DPPN2CWN2q7xLO+zpsToO3FvOAdduLyyS2UWGd6Z64WlrccQhT OL+zFkph6O27nZAUR4pDEqheuftVYdUDHLHbN.gB6p5K.20OqD05bFeyAyHz LChtJru7s4vaJY7BpRiB36cV0nNtWVlFoUoO9MHpGolwodtlZVP+zD9Fevcc O80Yy5JlORJ3ghp1Et+E+PEWIY+U+ZgnVbOnMFi0lUTr1FIVYinOvFgCZisH MQ4O+MicOHySJ0ix+GBVRguEz.m9T6x2u1J5VkgcDUkxmKSqJrmgvZFZIdp7 BFjfbDm7HSEHUh.AcCcaM3VAE7K8u4fakMoRES0nnffOOiQhzLFbEwTgrgxH mRYqFjxZsk6KSTB11NGqw2xgTcWiGXETqoSDwbDcoMrI9T1LxJ1zgLVsfwUe d5ZoQDCGQLBaSjhFNbj7kiXHlpJwdwrvQQN3wJlgF9nY2dnCEzpYE1qwiWZn E7D4yfhGVj2smkLtmfaU4hF.zdBxbnBFBmJFhbccp5CBJ9ktXhYuUDbXyruZ sfNNbWXxvIJ9HL7pO.4QYpOXN2vvINm6k+Gx4d.eHKiaQVZrbSdl3Har7vSs 7X+IcCrjJkIanmXzYUOwaSrOCjqT02rXQtHogG7GZViHfIW7XxBJeSASl+DM cA82s+SEjqJK.89ZVdHJdmtjVPB98gnKzXcTHWCokew4JBim1bEwW64J1TjU XOasKanIKn1DGSSOL+BF+3aEQaRc8eHoIqZDq6Wx9ab.7tUkQa+3Nt99Q1aP QGLlbVVFkuulRIKqtpUYS1KTuJfzRWQ5JRz6sFPKczfcDXEB+bf8BgTW5smG SNER3QfnUNEQqlderKcaqc0fmAQwNEQjQvQHmyQmCQXmhntT0lZHsSrBFEsm Xkt0kRewiYG0sGDQixKysN9ceZB.cNLQt9vT2093PLEMl.MWBjZa75r+A.XH 4uJ -----------end_max5_patcher-----------
Thanks for any help!
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.
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?
That might be one to email support about!
I actually fixed it. I limited the jit.uldl output values to 0-127 (only english ASCII characters) and everything began working!