ext.tools.webjects
Class Subst

java.lang.Object
  extended by ext.tools.webjects.Subst

public class Subst
extends java.lang.Object

implements a webject to run regular expression substitution on group columns.
NOTE: this alters the input group! to preserve state copy-group before!
pattern matching runs in DOTALL mode. (see http://java.sun.com/docs/books/tutorial/extra/regex/pattern.html)
all params can be repeated, each set is processed separately e.g.,: COL_IN[0], COL_OUT[0], RE[0] etc.

Parameters:

 Example: create a column "swap" from a column "one" swapping the 2nd and 3rc char: (abcde -> acbde):
 
 <ie:webject name="re-subst" type="EXT" use="ext.tools.webjects.Subst">
    <ie:param name="GROUP_IN" data="g"/>
    <ie:param name="COL_IN" data="one"/>
    <ie:param name="COL_OUT" data="swap"/>
    <ie:param name="RE" data="(?<=.)(.)(.)"/>
    <ie:param name="SUBST" data="$2$1"/>
 </ie:webject>

 Example: create a column "new" from a column "old1" and "old2" so if old1=X and old2=Y new will be "X Y"
 
 <ie:webject name="re-subst" type="EXT" use="ext.tools.webjects.Subst">
    <ie:param name="GROUP_IN" data="g"/>
    <ie:param name="COL_IN" data="old1"/>
    <ie:param name="COL_OUT" data="new"/>
    <ie:param name="SUBST" data="$1 !old2!"/>
 </ie:webject>
 


Field Summary
static java.lang.String CVSVersion
           
 
Constructor Summary
Subst()
           
 
Method Summary
 com.infoengine.object.factory.Task reSubst(com.infoengine.object.factory.Task task)
          entry point for webject invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVSVersion

public static final java.lang.String CVSVersion
See Also:
Constant Field Values
Constructor Detail

Subst

public Subst()
Method Detail

reSubst

public com.infoengine.object.factory.Task reSubst(com.infoengine.object.factory.Task task)
                                           throws com.infoengine.procunit.webject.GroupWebjectException
entry point for webject invocation.

Parameters:
task - used to get to group_in
Returns:
Task passes back group_in
Throws:
com.infoengine.procunit.webject.GroupWebjectException