Check string Begin with Symbol and Contain

Hi,

I want to check following things with string

  1. CANNOT Begin With ‘#’, or ‘?’ or ‘!’
  2. CANNOT CONTAIN ‘:’ or ‘|’

Someone please help me in this.

Thank you in advance :slight_smile:

Regards,
Suraj

1 Like

Hello @surajhy

You can try this:

1-) Not YourString.trim.StartsWith(“#”) or Not YourString.trim.StartsWith(“?”) or Not YourString.trim.StartsWith(“!”)
2-) Not yourString.Trim.Contains(“:”) or Not YourString.trim.Contains(“|”)

Let me know if it’s working
Hope it Helps! :wink:

2 Likes

Use is match activity and set pattern as ([1]+)(?!.[:|]+).
The result if the activity will be a Boolean value denoting the existence of the match.


  1. #?! ↩︎

3 Likes

Thank you so much Sir :slight_smile:

1 Like

Thank you so much :slight_smile: