Nilesh Avhad

Nilesh Avhad

  • 1.5k
  • 600
  • 260.9k

javascript function to check "|" symbol is present or not

Nov 26 2013 7:25 AM
My string messege contain the string either this:
var strMessage = "Plcc-failed|Score-passed|bankruptcy-passed|Years in Business
i.e. it contains a " | " symbol in it or this 
var strmsg="fail". 
I need a javascript function to check whether it contains a "fail" msg or " | " symbol.
How to write a javascript function for it.
 
Thanks in advance

Answers (2)