Prev | Current Page 405 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

For pattern
groups see below.
matchedLeft() : String Returns the portion of string at the left of the match result. As for
matched() this function can only be executed after a match()
or an exception is thrown.
matchedRight() : String Returns the portion of string at the right of the match result. As
for matched() this function can only be executed after a
match() or an exception is thrown.
matchedPos() : { pos:Int,
len:Int }
Returns an object containing the position of the match string and
its length.
split(s:String) :
Array
Uses the pattern to break a string into chunks.
replace(s:String, by:
String) : String
Replaces the matched string with the second argument. In the
replacement string by you can use $1 to $9 as placeholder for
matching groups.
Part II: Server Side, JavaScript, and Flash; Oh My!
212
group contains all the matched expressions. The matchedLeft() returns the portion of string on the left
to the matched expression and not the group. The matchedPos() returns an object with two values, the
position of matched expression in the string and its value.


Pages:
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417