Here's a small snippet that will replace spaces within quotes using
regex's. Just put your data into tString and the new data is put into
tResult.
repeat while matchText(tString, ([ quote ][^ quote ]+[
quote ]), tMatch)
put replaceText(tMatch, , ) into tReplacement
put
Apologies - sent the wrong snippet earlier. The correct version (very
similar) is;
Here's a small snippet that will replace spaces within quotes using
regex's. Just put your data into tString and the new data is put into
tResult.
put tString into tResult
repeat while matchText(tString, ([
On May 16, 2006, at 11:45 PM, jbv wrote:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
I'm curious what mandates regEx?
if the means is not an issue in reaching
Hi,
thanks for the response, but I don't think it would work...
let's go back to my example :
my beautiful laundrette
if you replace tOpenSpace first, then you get :
my beautiful laundrette
and then if you replace tCloseSpace, you get
mybeautifullaundrette
Thanks anyway,
JB
# How about:
put my quote beautiful quote laundrette into srctext
put into repchar
put 0 into oldoff
put 1 into toff
repeat while toff 0
put offset(quote,srctext,oldoff) into toff
if toff 0 then
put repchar into char oldoff + toff of srctext
add toff to oldoff
if repchar = then
On May 17, 2006, at 3:45 AM, jbv wrote:
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
(?x)
(?=) \ + (?= [^]* (?(?:[^]*){2})* [^]* \z
Hi Alex,
You're right about the additional assumptions, although one might
call the function within another repeat loop for each line, if each
pair of quotes is in one single line. As other solutions have shown,
one may also replace the return with a unique string before calling
this
many thanks to all list members who responded to my question.
actually I had already cooked my own script (see below - not
really elegant, but efficient fast enough for what I need to do).
I was just wondering if it could be done in a simpler way with
a regEx...
Best,
JB
put into myL
put
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
Thanks,
JB
___
use-revolution mailing list
use-revolution@lists.runrev.com
, jbv wrote:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
Thanks,
JB
___
use-revolution mailing list
use-revolution
store on-line: http://
www.salery.biz/salery.html
Op 17-mei-2006, om 11:45 heeft jbv het volgende geschreven:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
Thanks
jbv wrote:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
I'm not entirely clear on what you're asking for ...
given the description (remove spaces before
Mark Schonewille wrote:
Hi JB,
Again, no regex. I looked into regex, but I can't find how to replace
quoted strings without knowing the whole string in advance. It would
be great if someone came up with a regex solution for this. In the
mean time, this function seems to do the job quite
On 5/17/06 2:45 AM, jbv [EMAIL PROTECTED] wrote:
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
There are a few ways to use RegEx, depending on the exact situations you
jbv wrote:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my beautiful laundrette
becomes
my beautiful laundrette
This was harder than I thought it would be. I have something I think
works, but it isn't elegant
15 matches
Mail list logo