You need to sign in to do that
Don't have an account?
The new Learner
how to exclude alaphbets in number
Hi Experts,
There is an email is comes from webservice, in that email we are searching for the policy number with that policy number we are creating case but problem here is that its reading phone number also and creating case, so i observerd that phone number is coming prefix as "tel,T,telephone,phone,fax,F,+27" if i find anythig like this i need to ignore.
below is the expression we are using. can anyone help me please
public static final String REGEX_PATTERN_POLICY_NUMBER = '[0-9]{6,12}';
There is an email is comes from webservice, in that email we are searching for the policy number with that policy number we are creating case but problem here is that its reading phone number also and creating case, so i observerd that phone number is coming prefix as "tel,T,telephone,phone,fax,F,+27" if i find anythig like this i need to ignore.
below is the expression we are using. can anyone help me please
public static final String REGEX_PATTERN_POLICY_NUMBER = '[0-9]{6,12}';
Try to check below links which can help you on your Regex functionality in Apex
http://www.infallibletechie.com/2015/09/mobile-number-validation-using-apex-in.html
https://www.greytrix.com/blogs/salesforce/2015/05/27/use-of-regular-expression-in-apex/
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
have requirment where it has to read an email subject if it contains a policy number it has to create case but problem is that it sometimes its considering the mobile number also. to avoid this i am written below class please help me whether its correct or not.