A utilidade retorna os valores desejados do texto e exibe múltiplos valores, se existirem, com base na string de início e na string de término.
Class Test.Utility.FunctionSet Extends %RegisteredObject
{
/// W !,##class(Test.Utility.FunctionSet).ExtractValues("Some random text VALUE=12345; some other VALUE=2345; more text VALUE=345678;","VALUE=",";")
ClassMethod ExtractValues(text As %String, startStr As %String, endStr As %String) As %String
{ //Initialize Valriables
Set values = ""
Set start = 1
While start '= 0 {
Set start = $FIND(text, startStr, start)
IF start = 0 { QUIT }


.png)
.png)









.png)




