grep

From DavinciWiki
Jump to: navigation, search


Description

Search for the first occurrence of a pattern

Arguments and Return Values

Arguments: A text buffer and a string

Return Value: The lines of text containing the string

Usage

Syntax: grep(object = TEXT, pattern = STRING)

The grep() function copies each row of the passed TEXT object that contains the specified pattern. grep() supports regex patterns.

Examples

dv> text
Text Buffer with 3 lines of text
    1: This is a text buffer containing
    2: some information that you want
    3: we will use grep() to find it

dv> aline = grep(text,"information")
Text Buffer with 1 lines of text
    1: some information that you want

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 03-27-2006

Personal tools