Format Text

Verb: formatText

Formats the input text according to CPF, CNPJ, PIS, CEP or Credit Card standards.

Syntax

formatText --text(String) --texttype(TextFormattingType) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--text Text Required Text Input text for formatting.
--texttype Type Required TextFormattingType Options for formatting Text .
  • CEP (Brazil)
  • CNPJ (Brazil)
  • CPF (Brazil)
  • Credit card
  • PIS (Brazil)
  • ;

    Outputs

    Script Designer AcceptedTypes Description
    value Text Text Text formatted according to Type selected.

    Example

    Example 1: Formats the contents of Text to CEP (Brazil).

    defVar --name textEntry --type String --value 15086260
    defVar --name formattedText --type String
    formatText --text "${textEntry}" --texttype "BrazillianCEP" formattedText=value
    logMessage --message "${formattedText}" --type "Info"
    // This example produces the following result:
    // "15086-260"
    

    Example 2: Formats the contents of Text to CPF (Brazil).

    defVar --name textEntry --type String --value 08644459899
    defVar --name formattedText --type String
    formatText --text "${textEntry}" --texttype "BrazillianCPF" formattedText=value
    logMessage --message "${formattedText}" --type "Info"
    // This example produces the following result:
    // "086.444.598-99".
    

    Remarks

    It is necessary to inform in the Text parameter, the content according to the format Type .

    See Also

  • Add Escape Characters to Regular Expression
  • Add Escape Characters to Text
  • Calculate Hash
  • Change Text Case
  • Check File
  • Concatenate Texts
  • Convert HTML to Text
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Get Subtext
  • Get Text from Regular Expression
  • HTML to Markdown
  • Insert New Line to Text
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks