bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Not a bug, need help coding search&replace on a vector


From: Christian Robert
Subject: [Bug-apl] Not a bug, need help coding search&replace on a vector
Date: Mon, 20 Jun 2016 23:12:07 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hi, it's not a bug but a request for help,


suppose 
s="^^^This^is^a^^^^test^^with^^^^^lot^of^blanks^^^^at^beginning^and^^^end^^^^^^"
suppose from="^^^"
suppose to="^"

I need a function who can replace ("^^^" to "^"), or ("^" to "^^^^^^^^") or ("" to 
"blabla" with limits of source size)  ie: without being lost in infinite loop.



"s" is a character vector, "from" is a character vector, and "to" is a 
character vector,
both "s", "from" and "to" can be "".



I'm pretty sure this idiom already exist.

if you can help me, please do.

Xtian.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]