Is there a way to unstring a value that i have echoed? I need characters 8 thru 14 of a 17 character field
I am saving a value from a screen called our policy number. The entire policy number is in this format nn-nnn-nnnnnnn-nn. I need characters 8-14 to do a search in another screen. Is there a way that I can unstring this field for only those characters? Or is there a way that I can only save characters 8-14 of the value?
I am saving a value from a screen called our policy number. The entire policy number is in this format nn-nnn-nnnnnnn-nn. I need characters 8-14 to do a search in another screen. Is there a way that I can unstring this field for only those characters? Or is there a way that I can only save characters 8-14 of the value?
All Replies (1)
Use a regular expression.
javascript:(function(){var t='nn-nnn-nnnnnnn-nn',p=prompt(t,t);alert(/..-...-(.......)-../.exec(p)?RegExp.$1:'(nothing)');})();