Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to use regular expression pattern for variable prompt #4066

nini10 ·

Hi,

Can you please guide me how to use regular expression pattern for variable prompt?

I have variable which "prompt as text input" and I want to verify it doesn't contains space.
I tried several patterns, but none of them work:

  • ^\s*\S+\s*$
  • [^-\s]
  • .\S.

What is the right way to do it?

Thanks!

  • solved #2
  • replies 1
  • views 15
  • stars 0
robinshen ADMIN ·

The correct syntax would be:

[\\S]+

Note that the normal syntax is [\S]+, however for QB the regex is considered as a Java string, so back slash needs to be escaped.