Hi All,

Could someone explain to me how to use Regex to validate:

There are no letters or symbols in an input text variable. What should be the entered in the pattern field for this?

Or please suggest some other better/easier method. I have looked into these components in Forge:
https://www.outsystems.com/forge/component/3308/restrict-chars-sample/?Unfollow=False

but it looks too advanced for my skills, prefer to keep it to server side validation for now. I am not very comfortable with JS or Jquery.

Thanks.


Solution

Hi André,

If you want to exclude letter and symbols it means you only want digits correct? "^\d+$" this regex used on regex_search returns false if the text contains anything other than a digit.

Regards,

Marcelo

Solution

Marcelo Thanks, that is exactly what I was looking for.
Where can I learn the syntax for Regex? So I can learn the other parameters I can use with this action.

André P wrote:

Marcelo Thanks, that is exactly what I was looking for.
Where can I learn the syntax for Regex? So I can learn the other parameters I can use with this action.

I use this a lot when working with regex

https://regex101.com


Hi,

I use the same site as João.

Regards

Marcelo Ferreira wrote:

Hi André,

If you want to exclude letter and symbols it means you only want digits correct? "^\d+$" this regex used on regex_search returns false if the text contains anything other than a digit.

Regards,

Marcelo

Hi

Can you help me with this issue.

https://www.outsystems.com/forums/discussion/47924/regex/#Post175764