Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-22-2003, 03:26 PM   PM User | #1
Abdi
New to the CF scene

 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Abdi is an unknown quantity at this point
about a function

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:
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>
Abdi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:38 PM.


Advertisement
Log in to turn off these ads.