|REBOL 3 Docs||Guide||Concepts||Functions||Datatypes||Errors|
|TOC < Back Next >||Updated: 6-Feb-2009 Edit History|
["a" skip "b"] ["a" 10 skip "b"] ["a" 1 10 skip]
To skip until a specific character is found, use to:
["a" to "b"]
The previous example starts parsing at a and ends at b but does not include b.
To include the ending character, use thru:
["a" thru "b"]
The previous example starts parsing at a, ends at b, and includes b.
The following rule finds the title of an HTML page and prints it:
page: read http://www.rebol.com/ parse page [thru <title> copy text to </title>] print text REBOL Technologies
The first thru finds the title tag and goes immediately past it. Next, the input string is copied into a variable called text until the ending tag is found (but it doesn't go past it, or the text would include the tag).
|TOC < Back Next >||REBOL.com - WIP Wiki||Feedback Admin|