Ignore punctuation when addressing word n of a string [more info]

Mark Powell Mark.Powell at veritas.com
Mon Aug 11 20:32:00 EDT 2003


Okay, so "word" automatically assumes white space as delimiter.  I can't
skim out the punctuation, so can someone suggest how I do the following.
(This example is closer my real life problem).

Within a bunch of text, I want to replace any string of pattern 

00-000

(where 0 is any integer and the dash is a literal dash) with a string of 

<A HREF="#00-000">00-000</A>

In other words, I am looking to bracket the pattern string with an HTML
index tag that uses the same literal string as a named target.  Short of
doing a char-by-char crawl, how can I accomplish this search and replace?  

ManyTIA

Mark Powell
Production Manager
VERITAS Education

---original post----
I have a string such as "now, that is a string!"  But when I address word n
of the string, I get "now," (when n = 1) and "string!" for (when n = 5).
How can I point to a string and get only the nth word, without any
contiguous punctuation getting in the way?  
---------------------






More information about the use-livecode mailing list