Re: regexprep wildcard problem
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Wed, 23 Jan 2008 22:55:25 +0000 (UTC)
In article <fn8fau$2u3$1@xxxxxxxxxxxxxxxxxx>,
per isakson <poi.nospam@xxxxxxxxxxxxxxx> wrote:
"Christian Kuijlaars" <c.a.j.kuijlaars@xxxxxxxxxxxxxxxxxx>
wrote in message <fn6us9$5fa$1@xxxxxxxxxxxxxxxxxx>...
I have the string 'atp[c]' which needs to be transformed
into 'atp', the same counts for 'atp[p]'.
ans =regexprep({'atp[c]','atp[p]'}, '\[.\]', '')
'atp' 'atp'
This will work for any one character inbetween square
brackets. / per
Unfortunately it will also transform 'a[c]t[p]' to 'at' --
the pattern isn't anchored to only match terminal \[.\]
It will also do strange things to a[[]]tp
--
We regret to announce that sub-millibarn resolution bio-hyperdimensional
plasmatic space polyimaging has been delayed until the release
of Windows Vista SP2.
.
- References:
- regexprep wildcard problem
- From: Christian Kuijlaars
- regexprep wildcard problem
- From: per isakson
- regexprep wildcard problem
- Prev by Date: Re: [Help] Printing problem in Mac OSX Leopard
- Next by Date: Find integral under three points
- Previous by thread: regexprep wildcard problem
- Next by thread: regexprep wildcard problem
- Index(es):
Relevant Pages
|