Tuesday, December 25, 2012

Re: Regex for matching the section in vim help files

On 2012–12–25 Christian Brabandt wrote:

> I am not sure, what you problem is,

The problem is to find a regular expression which matches the
section titles.

The section title is the part I marked with caret symbols in my
original post. The regex I used to use turned out to be insufficient
when it comes to non-ASCII characters.

> but are you possibly looking for matchstr()?

No. The regex I'm looking for is the second argument to matchstr().
The first argument is a string like this:

3. Simple changes *simple-change*

and the returned string would be "Simple changes".


Marco

No comments: