Way to get lineOffset to only match at the *beginning* of a line?

Jim Witte jswitte at bloomington.in.us
Tue Feb 28 02:39:39 EST 2006


   I want to do something like lineOffset, but I only want to match  
the target if it's at the beginning of the line.  So

lineOffset("this", theText)

where theText is:

"article about this one experiment by Dr. Jekyll
this experiment went very horribly wrong.."

would return 2, and not 1, even though the target appears in line 1.

If lineOffset could take regular expressions, I could use something  
like "^this" - but it doesn't.

   I'm using Revolution 2.0.3, if the is a feature in a later version.


More information about the Use-livecode mailing list