Extract the value of PM and CM from the given text.

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

Parents
  • +1
    Certified Associate Developer

    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

      • "CM: Nick Hunt "(Text)
          • "ECE: Fred Wang "(Text)
              • "General Contractor: Villamar "(Text)
                  • "PM: Rick Chan "(Text)
                      • "RF Designer: Eric Chan "(Text)
                    Reply
                    • +1
                      Certified Associate Developer

                      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

                        • "CM: Nick Hunt "(Text)
                            • "ECE: Fred Wang "(Text)
                                • "General Contractor: Villamar "(Text)
                                    • "PM: Rick Chan "(Text)
                                        • "RF Designer: Eric Chan "(Text)
                                      Children
                                      No Data