Skip to main content


I have a user name with "domainuser11" and need to be extract text after the ""

Hello,

One way is to use a "Build String" action and then use something like the replace function inside of it:

fn-Replace(text to modify, old text to replace, replacement text)

So in your case something like - note the empty single quotes might be hard to see below as the third parameter passed in:

fn-Replace(variableThatHoldsInformationToModify, 'domain', '')

Then in the Store Results In area of the Build String put whatever variable you want the results to be stored in, which will hold the value without the domain.

Note:  I'm assuming the domain is always the same, because you didn't specify how this value was being generated..

Thanks


You can also use the Regular Expression action:

 

 

 

 

  • /^<^\]+\(.*)$/

     

    • ^ assert position at start of the string
    • s^\]+ match a single character not present in the list below
      • Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed sgreedy]
      • \ matches the character literally
    • \ matches the character literally
    • 1st Capturing group (.*)
      • .* matches any character (except newline)
        • Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed sgreedy]
    • $ assert position at end of the string

 

Manfred


Thanks Mike M. and Manfred, both suggestions worked.  I went with the Regular Expression since we have two different domain names and formula would work in this situation.


Use regular expression action with operation replace text:

/^.*(/[^/]+)$/

  • ^ assert position at start of the string
  • .* matches any character (except newline)
    • Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
  • 1st Capturing group (/[^/]+)
    • / matches the character / literally
    • [^/]+ match a single character not present in the list below
      • Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
      • / matches the character / literally
  • $ assert position at end of the string

Any parttern to extract only the comments of approver?


How do I clean up the approver comments to only show text value?


Reply