Hi Dave
> PS I think I just mailed again from the wrong address again. Expect
> to see the same reply in a month or so. :-0
It is so nice to know that I am not the only one subject to "Senior moments".
:-))
/H
Hugh Senior
___
metacard ma
Hi Hugh
I think I wrote those mails a long time ago from the wrong address
and they've just been allowed through now.
Sorry if they prompted you to respond.
Cheers
Dave
PS I think I just mailed again from the wrong address again. Expect
to see the same reply in a month or so. :-0
Hi
Hi Hugh
I think I wrote those mails a long time ago from the wrong address
and they've just been allowed through now.
Sorry if they prompted you to respond.
Cheers
Dave
Hi Dave,
Case sensitivity is an optional extra (although international
should, if
possible, be handled for those wh
hole("This is a test",sourceText) => FALSE
whole("This is a test-piece",sourceText) => TRUE
/H
>Hi Hugh
>
>Usual technique to seek extra time from a client is to ask more
>questions. :-)
>
>I assume the string has to match on the
Hi Hugh
Usual technique to seek extra time from a client is to ask more
questions. :-)
I assume the string has to match on the start of a word boundary.
e.g.
put "This is a test." into sourceText (note the punctuation)
whole("is is a test",sourceText) => FALSE
Sorry. Ignore my first try. It fails already. (-:
Dave
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard
The Challenge:
"Write a function that returns TRUE or FALSE for the existence of any valid
text string existing within any longer text string. (To make things easier we
limit this to ASCII text; right-to-left double-bite Unicode character reco
gnition can come later :-)"
e.g.
put
On Tue, 12 Jun 2007 14:26:12 EDT, [EMAIL PROTECTED] wrote:
> I've returned to this little conundrum many times over the years but have
> yet to solve it.
>
> Any offers?
How about:
put wholeWordMatch("This is a test",long id of fld 1)
function wholeWordMatch pFindText,pFldRef
find w
This doesn't check that the matched target starts on a word boundary,
But a simple check on char (tOff -1) or whether tOff is at the
beginning of the target shoud do it.
On 12 Jun 2007, at 20:32, Dave Cragg wrote:
Please ignore my first attempt. It fails horribly. (-:
Here's another. Any
Please ignore my first attempt. It fails horribly. (-:
Here's another. Any better?
function whole s,t
put length(s) into tNumChars
put ",.;:?!" & space & tab & cr & numToChar(13) into tWB
put offset(s,t) into tOff
if tOff = 0 then return false
return length(t) = (tOff + tNumChars - 1)
How about something like this:
put "This is a test." into myLine
replace " " with "*" in myLine
put fld 1 into myField
replace ". " with ".#" in myField (note : period + space. use two spaces
if needed)
replace space with "*" in myField
replace "#" with space in myField
if myLin
Hi Hugh
First try.
But like from our clients, we need clearer specs. ;-) What are the
punctuation rules?
This assumes only final punctuation in the target should be ignored.
It will try to match punctuation where it exists in the source. It
will fail if there is double punctuation in the
I am trying to write a function that returns whether a given phrase exists
in a field as whole words.
e.g.
put "This is a test." into fld 1 (note the punctuation)
whole("This is a tes",fld 1) = FALSE
whole("This is a test",fld 1) = TRUE.
A bit like trying to get the line "This is a tes" i
> I want to replace three spaces with a tab stop.
You mean something like...
set the defaultStack to "Karten"
repeat with n=1 to num of marked cds
replace SPACE&SPACE&SPACE with TAB in fld "Antwort" of
marked cd n
end repeat
HTH
/H
___
meta
Hi!Before I learned that I can arrange text in a field with tab stops I used a lot of spaces.Now I want to replace three spaces with a tab stop. Here is my script:on mouseUp global old global new put fld "Alt" into old put fld "Neu" into new go stack "Karten" go next marked cd go fld "Antw
Wouter,
Thanks. Got it. Different strategy, but nice:-)
Wouter wrote:
Chipp, sorry for the delayed response due to festivities.
My other handler is using the difference in number of lines of a field
and the number of lines of the formattedtext of the same field if the
text is "wrapped". And it is
On 29 Dec 2004, at 18:00, [EMAIL PROTECTED] wrote:
Message: 1
Date: Tue, 28 Dec 2004 20:08:02 -0800
From: Chipp Walters <[EMAIL PROTECTED]>
Subject: Re: function to calculate string length...
To: Discussions on Metacard
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charse
Thanks for this, would you mind explaining what it does?
Thanks again
Chipp
Wouter wrote:
Re: function to calculate string length...
Chipp Walters
Sun, 26 Dec 2004 04:21:44 -0800
Well, I cobbled this together from some of the archives...
Anyone see an obvious place to optimize?
on formatFld
Re: function to calculate string length...
Chipp Walters
Sun, 26 Dec 2004 04:21:44 -0800
Well, I cobbled this together from some of the archives...
Anyone see an obvious place to optimize?
on formatFld pFldName, pTxt
lock screen
put the width of fld pFldName into tW
set the width of fld
Got it.
answer replaceText(fullPATH, sessionPATH, "")
On Jun 30, 2004, at 11:09 AM, Simon Lord wrote:
I have two strings, file paths actually. Both path names are the same
for the first ~5 directories, then the rest is what I'm actually
interested in.
My questions is, how can I
I have two strings, file paths actually. Both path names are the same
for the first ~5 directories, then the rest is what I'm actually
interested in.
My questions is, how can I compare string "A" to string "B" and get the
diff
>> How do you assemble a string that contains ampersands in it?
> Put 'em in quotes:
>
> put name1&"="&value1&"&"&name2&"="&value2
>
> Is that what you were looking for?
Yes -- thank you. Big "duh&qu
Put 'em in quotes:
put name1&"="&value1&"&"&name2&"="&value2
Is that what you were looking for?
You could also define your own constant...
Regards,
Brian
<< OK, I g
OK, I give up. How do you assemble a string that contains ampersands in it?
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com
___
metacard mailing list
[E
>> find string "married"
>>
>> hit return: first instance of "married" is found and hilited.
>> arrow up to the same command in the message box. hit return again:
>>
>> Now, this is the "weird" part and the one that is causing ha
Sivakatirswami wrote/ schreef:
> open message box and enter:
>
> find string "married"
>
> hit return: first instance of "married" is found and hilited.
> arrow up to the same command in the message box. hit return again:
>
> Now, this is the &q
OK as I pursue the solution to an eBook search function we find this
anamoly:
This is a small 70 page/card book. One field per card. There are about 15
instances of the word "married" in the whole book spread out over as many
cards.
open message box and enter:
find string "marri
SKTS said. . . .netetiquettely tersely:
"couldn't get FIND to work on a multi line string" . . .and
Andu said, with even more awesome brevity:
> couldn't resist:
> on mouseUp
> local t1,t2
> set the itemdel to ""
> repeat for each item x in fld
t. Problem is I can't get the
>script to find the data in the field. I have used "Whole" and "String" to no
>avail. I know the address is there. . .because I can see it in the message
>box. . .the value of x, but why can't MC find x in the field? This works in
Couldn't resist...
on mouseUp
local t1,t2
set the itemdel to ""
repeat for each item x in fld "tTextField"
if the number of lines of x = 4 then
put x -- OK we know we got one. . .it shows in the message box
if matchChunk (fld "tTextField", "(." & x & "*)",t1, t2) then put t1
t get the
script to find the data in the field. I have used "Whole" and "String" to no
avail. I know the address is there. . .because I can see it in the message
box. . .the value of x, but why can't MC find x in the field? This works in
Supercard. . .I am missing something.
31 matches
Mail list logo