Excerpt | ||
---|---|---|
| ||
indexOf(stringToTest, stringToLookFor) Returns the character position of one string inside another. |
Function: indexOf()
Returns the character position of one string inside another.
...
indexOf("Thomas Troubridge", "x")
Returns 0.
Code Block |
---|
do( $start = indexOf(in.fileName, "_") + 1, $end = $start + 8, $date = substring(in.fileName, $start, $end) ) |
If in.fileName contained file names like "switchRC48_20060708.exp", the script above would extract the date element of the file name.
...