...

View Full Version : about a function



Abdi
10-22-2003, 03:26 PM
Hi everyone,

I was working on a function that has array where the content(indexes)
of this array are VoiceMail messages, I was trying to set up a regular expression
that gets the first message(i.e index 1), but it is giving me all all contents (i.e index 1 and index 2).

Can anyone see what I might be getting wrong ?
my objective is to extract the first index like this:

" message-one hi this is abdi if you get this message please call me."

here is javascript with the vociexml code but don't worry about
voicexml code. I need help only for javascript:


code

<?xml version="1.0"?>
<vxml version="1.0">

<script>
function test(message) {
MessageArray = new Array ("message-one hi this is abdi if you get this message please call me.",
"hi jack you are missing something very interesting,if you get this message please call me");

var z = /\b(message-one\s+.* )\b/gi;
test = z.exec(MessageArray);
return test ;

}

</script>

<form id=" ">
<block>
<prompt>
this is <value expr="test() "/>
</prompt>
</block>

</form>
</vxml>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum