We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to allow numbers and decimals in string

pramodkumar
Tera Expert

Hi All,

How can we create regex to allow numbers and decimals in string variable.

For ex: 1234, 12334.89

 

 

Thanks!

5 REPLIES 5

Sayali Gurav
Kilo Sage

Hello @pramodkumar ,

- Open your variable 

- In tabs section click on Type Specifications tab

- In Type Specifications tab click on Validation Regex choices values and select Number.

- Save

SayaliGurav_0-1697459616457.png

 

SayaliGurav_2-1697459784886.png

 

Mark helpful or correct if applicable.

Thanks & Regards,

Sayali Gurav