Validation for first letter case sensitive using regex match function

Certified Senior Developer

Hi 

Please be informed that i am trying to provide validation for a one user input field in a pattern like P (upper case).7 digits.2 digits.2 digits (if applicable) i have tried like below but for two conditions it was not working if first letter P is lower case also it was returning true and for last 2 digits if applicable then only it will be having those digits but it was expecting those two as mandatory. 

Could you please suggest on this

a!localVariables(

local!input:"P.8790889.87",

local!pattern:"[P].[0-9]{7}[.][0-9]{2}[.][0-9]{2}",

local!output: regexmatch(

local!pattern,local!input

),

local!output

)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data