Get String value using RegEx with special characters

Hi All,

I need to extract the text after first colon(:slight_smile: and also need to check whether the text is exists.

For Example: β€œ:08:44:36 PM 07-Mar-2024”
Expected Results: 08:44:36 PM 07-Mar-2024

Thanks,

Hi @neelimaintern

Input = ":08:44:36 PM 07-Mar-2024"

Output = Input.TrimStart(":"c)

If
 Output.length>0
  Then 
     Places the steps if the condition is met
   Else
     Places the steps if the condition is not met
End If

Hi @neelimaintern , can you try this Regex?

(?<=:)([^β€œ]+)(?=”)

  1. Use the β€œMatches” activity.
  2. Set the input text as the target string.
  3. Set the regex pattern as (?<=:)([^β€œ]+)(?=”)
  4. Access the first match result to obtain the text after the first colon.

Thanks,
Aswin Sridhar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.