Continues to search the string for the next match after using the FINDNEXT() function.
| Category: | Regular Expression |
| Returned data type: | Boolean |
specifies the string value in which you want to search for the pattern defined by your compiled regular expression. This can be an explicit string ("MyValue"). This can also be a variable already defined in your expression code or passed to your expression node as a column from a previous node (MyValue or "My Value").
| Requirement | input must not be NULL or blank. |
// Define some string variables
string MyString
string MySubString
// Set one to some sample input
MyString = "DwAwTxAxFyLyUzXz"
//You must define a regex object
regex r
// Then compile your regular expression
// This one will match any single uppercase letter
r.compile("[A-Z]")
// Find the first pattern match
if r.findfirst(MyString)
begin
// Pull the pattern from MyString and place it into MySubString
MySubString = mid(MyString, r.matchstart(),r.matchlength())
// Use pushrow to create new rows - this is purely for the sake of
// clarity in the example
pushrow()
// Create a while loop that continues to look for matches
while r.findnext(MyString)
begin
// Pull the pattern from MyString and place it into MySubString agin
MySubString = mid( MyString, r.matchstart(),r.matchlength())
// Just for display again
pushrow()
end
end
// Terminate the expression node processing
seteof(true)
// Prevent the last pushrow() from showing up twice
return false