Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rboccuzziHarley, if you have a field, lets call it columnN, as in your above example, you would use a filter node, and your brainscript would be:
result = substr('columnN', 3)
override emit *, result as "columnN"
The function
substr takes as arguments the column to retrieve the substring of, the offset to start taking the substring, and optionally, the length of the substring.
The result of the function is assigned to the result variable, and then that is emitted along with all the other fields of data (using the *). Because there is already a field called "columnN", you need to put an override in front of emit, to acknowledge that you are overriding a field that already existed.
In the future, if you are looking for various string manipulation functions, remember that there is a list of string operators in the online help for you to peruse. You can get to them by the Help menu in BRE, choosing the BRAINscript help, which will open an IE browser. On the left of the browser, there will be an expandable table of contents, and you can look at all the string operators available to you there. Clicking on one will give you the details of its use, usually with examples.
Cheers
Rich