WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:SED Runtime
Description:Text stream editor similar to unix sed
Id:SEDRuntime
Category:accessor
Identifier Syntax

SED Runtime is an accessor using Active URI syntax with the following base identifiers:

Base
active:sed

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operator
Mandatory
Representation (java.lang.Object)Editor declaration
operand
Mandatory
Representation (java.lang.Object)Text resource to be edited
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use SED Runtime accessor you must import the module urn:org:netkernel:lang:trl:

<import>
  <uri>urn:org:netkernel:lang:trl</uri>
</import>

SOURCE

When a request with the SOURCE verb is issued to active:sed the operator specified in the operator argument is compiled as a series of "stream edits" and applied sequentially to every line of the operand resource.

operator

A declarative stream edit list. Having the form...

<sed>
  <pattern>
    <regex>foo</regex>
    <replace>baa</replace>
  </pattern> ...
</sed>

Any number of items may be included. Each pattern is compiled. The sequence of pattern operations are applied in declaration order to each separate line of the operand resource.

operand

A resource transreptable to IReadableBinaryStream for stream editing.