Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: awilliams1024Hi Jagdev,
I think the Regular Expression functionality would be appropriate here as it allows you to 'anchor' the match to the start of the string. Copy and paste this example into the BRE canvas. See the Regular Expression Operators section of the BRAINScript help for details of this and other operators that support regular expressions.
node:Static_Data
bretype:core::Static Data
editor:sortkey=5773c60741fc50a5
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
data:string,payload:string
"Stone Age","text"
"one Sam","text"
EOX
editor:XY=240,160
end:Static_Data
node:Filter
bretype:core::Filter
editor:sortkey=5773c62f57ad05ce
input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
output:@40fd2c7420761db6/=
prop:Script=<<EOX
tmpStr = regexSubstitute(data, "^one", "1")
emit *
exclude data
emit tmpStr as "data"
EOX
editor:XY=350,160
end:Filter
Regards,
Adrian