[Israel.pm] regexp
rami doqa
rod082 at yahoo.com
Sun Jun 25 11:43:41 EEST 2006
try to do the following:
my $str =
"aaa<asd>='asd'/6>bbb<asd>='asd'/3>ccc<asd>='asd'/5>ddd###";
$str =~ s/<asd>='asd'\/\d+>/,/gi; # replace the
"<asd>='asd'/6>" with a choosen seperator
# u can replace the comma with any seperator u want
(not occure inside the values)
$str =~ s/###$//; # remove the last ### chars
my @tokens = split(',',$str); # insert the values in
an array
-- "Ernst, Yehuda" <yernst at nds.com> wrote:
> Hello!
>
>
> I have a text like this
>
>
"aaa<asd>='asd'/6>bbb<asd>='asd'/3>ccc<asd>='asd'/5>ddd###"
>
> I need to extract the aaa bbb ccc ddd
> between is the same <asd>='asd'/6>
> just the number can be different
>
> i do not know how many <asd>='asd'/6> are there the
> end is like this ###
>
> any ideas?
>
> Thanks
>
> Yehuda Ernst ×××××
> ××¨× ×¡×
> NDS Technologies Israel Ltd. mailto:yernst at nds.com>
> Jerusalem Tel: +972 (2) 589-4427
> PO Box 23012 Fax: +972 (2) 589-4825
> Israel. 91235 Cell +972 54 5664427
>
>
***********************************************************************************
> This email message and any attachments thereto are
> intended only for use by the addressee(s) named
> above, and may contain legally privileged and/or
> confidential information. If the reader of this
> message is not the intended recipient, or the
> employee or agent responsible to deliver it to the
> intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this
> communication is strictly prohibited. If you have
> received this communication in error, please
> immediately notify the postmaster at nds.com and
> destroy the original message.
>
***********************************************************************************
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Perl
mailing list