[Top][All Lists]

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

Positional operators at regexprep

From: KalleWirsch
Subject: Positional operators at regexprep
Date: Tue, 27 Nov 2007 14:18:48 -0800 (PST)

excuse me for my badly englisch.

At Matlab positional operators are defined as follows 
 "Positional operators in an expression match parts of the input string
not by content, but by where they occur in the string (e.g., the first N
in the string).
Match expr when it occurs at the beginning of a word.
Match expr when it occurs at the end of a word.

I have a problem with the characters \< \> because octave don't recognize # 
inside \< \>.
For example in octave I worked with ...
str = 'My flowers #may bloom in May';  Character "#" is important in my
case. Octave can't process with it in this context
pat = '\<#may\>';
regexprep(str, pat, 'April')

Octave afford the following result... ans = My flowers #may bloom in May. 
Well it's wrong i want to get this result... ans = My flowers April bloom in

Have anyone an idea because of my problem with \<# \>
I hope you can understand my question.

Regards KalleWirsch
View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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