Path: news.mathworks.com!not-for-mail
From: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Regexp Challenge
Date: Wed, 20 Jan 2010 12:51:05 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 9
Message-ID: <hj6u7p$8cr$1@fred.mathworks.com>
References: <hj5e1c$7oj$1@fred.mathworks.com> <77d74c77-3913-4ad5-b40b-fc063a9aa07f@p8g2000yqb.googlegroups.com> <hj5rng$pk6$1@fred.mathworks.com>
Reply-To: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1263991865 8603 172.30.248.35 (20 Jan 2010 12:51:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 20 Jan 2010 12:51:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:600172

Dear Matt!

> regexprep(A,'([^/]+/)(?!/)','${strrep($1,$1,'''')}')

Your REGEXPREP is fine and fast (I think - I do not dare to copy it).
But it is not nice Matlab poetry.
It looks like someone has rolled an angry armadillo over the keyboard.

Not your fault! Jan