text - "CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan ",
output-
CM: Nick Hunt
PM: Rick Chan RF
Discussion posts and replies are publicly visible
Is that a coding challenge?
no
OK. Do you have any specific questions or code you would want to share?
An expression rule return a value like "CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan ", and i want to extract the value PM & CM
Can you share more details? Are these string always in the same order? Do names always have two parts? Are there any other abbreviations?
It can be quite a challenge to create a robust algorithm that extracts specific parts from almost random text.
And I need to ask again: Do you already have some code to share?
appian.rocks/.../
Stefan already asked you to provide the required details (order, pattern, etc.) for an error-free solution. However, you can try the following code:
a!localVariables( local!text: "CM: Nick Hunt ECE: Fred Wang General Contractor: Villamar PM: Rick Chan RF Designer: Eric Chan ", local!dText: substitute( substitute( substitute( substitute(local!text, "ECE:", ";ECE:"), "General Contractor:", ";General Contractor:" ), "PM:", ";PM:" ), "RF Designer:", ";RF Designer:" ), local!data: split(local!dText, ";"), local!data )
Output:
List of Text String - 5 items