next up previous 524
Next: Modification
Up: Specifying Groups of Objects
Previous: Indirection


Editing

A group expression can contain a request to edit the supplied strings before passing them to the application. The editing facilities provided are fairly simple. You can:

To perform this editing, you:

  1. Enclose the group expression specifying the strings to be edited within curly braces ("{" and "}"). Note, if no prefix or suffix is supplied, and the group expression is not a comma-separated list, then the curly braces can be omitted.

  2. Preceed the opening curly brace with the prefix (if any) to be added to the start of each string.

  3. Follow the closing curly brace with the suffix (if any) to be added to the end of each string.

  4. Append a string specifying the substitution to be performed (if any) to the end of the whole thing. This string should be of the form |<old>|<new>| where <old> is the text to be replaced and <new> is the text with which to replace it. Note, the substitutions occur before any specified prefix or suffix is added to the strings.

For instance;

   A{^file}B|my|your|

This will read strings from the text file file. Each occurence of the string "my" will then be replaced by "your". The resulting strings will then have "A" added at the start, and "B" added at the end.



next up previous 524
Next: Modification
Up: Specifying Groups of Objects
Previous: Indirection

KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2008 June 14
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council