String utility regex

When you are creating a workflow with the BMC Atrium Orchestrator Development Studio application, you can use the regex utility to check for patterns in strings or perform substitution on strings. The Regex utility is based on Java’s Regex utility.

The regex utility evaluates or modifies a simple string using the Regex Transform Editor. If you select evaluate, the String utility evaluates the input string and indicates whether the search pattern is contained in the string. The output value of the evaluation is either true or false. If you select modify, the String utility searches the input string for the search text and substitutes that text with the replacement text.

You can use the String utility to evaluate strings with regular expressions, or to substitute a string with a regular expression.

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. James Annis

    In general, the Regex syntax appears to follow Java regular expression syntax.

    Be careful with input documents that might contain newlines; the Search matches single lines only. Multiline inputs return false even if the pattern matches the first line.

    Work around:

    prefix the single-line flag (?s) to the regex so the dot operator will match newlines.

    Example:

    Given Multiline Input:

    The fun guy is Jack

    The clever guy is Jim

    This Regex returns "false":

    .*Jim.*

    This Regex returns "true":

    (?s).*Jim.*

    Nov 25, 2016 03:01
    1. Dorothy Poole

      Thank you for your comment. I am following up with the team and will update the page based on their feedback.

      Nov 28, 2016 08:04
    1. Dorothy Poole

      After a discussion with team members, I've updated the page to state that the Regex utility is based on Java’s Regex utility. Thanks again.

      Nov 29, 2016 07:04
  2. James Annis

    Could you please include a link to a reference standard that explains the syntax for this version of Regex?

    You see, typically Java uses the syntax, "\1" as back-reference notation for a group match, but this Regex utility uses "$1" for back-reference. Is it possible that this regex follows XPATH Regex instead of Java Regex? There is some overlap between the two, so it would be helpful to eliminate the confusion by identifying a good reference.

    Nov 29, 2016 08:44
    1. Dorothy Poole

      Hi Jim,

      That is a good question. I've run your comments by a team member and he is going to research this issue. I created DRAUM-21788 to track the issue. As soon as I have more information, I will update the page.

      Nov 29, 2016 09:11