|
From: Raymond I. <xw...@ya...> - 2003-06-05 18:32:53
|
Hi,
I'm not too familiar with the regex object so I'm
wondering if anyone can help me out? Here's an example
of what I'm trying to do:
var s=" test <table>{@field1}</table2> this is a
test{@field2} {@field3:[test message]} tht ere
{@field4:[test message4]}";
var r= /\{@.+?\}/g;
var a= s.match(r)
s=a.join()
s=s.replace(/\{@(\w+?)\W.+?\}/g,'$1');
alert(s)
I would like the use regex to get all the field names
withing the a string then use another regex to get all
multi-line field names and their content
({@fieldname:[content]}). Is this possible?
Many thanks
--
Raymond Irving
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
|