Re: regexp : windows filename recognition

2019-10-11 Thread Ni Va
It works well with .*$ in order to substitute and get first backward reference. ^..\(.\{-}\)\s\+\d\+\.\d\+.\{,20} needed to add .*$ Thank you. Le jeudi 10 octobre 2019 17:19:25 UTC+2, Andy Wokula a écrit : > > Am 10.10.2019 um 10:44 schrieb Ni Va: > > Don't understand why it returns 2 first

Re: regexp : windows filename recognition

2019-10-10 Thread 'Andy Wokula' via vim_use
Am 10.10.2019 um 10:44 schrieb Ni Va: Don't understand why it returns 2 first chars on this example : + 20191009_191004_Vim.8.1.2125/ 4.0 KiB [D] 2019-10- echo substitute(getline(line('.')),'^..\zs\(.\+

Re: regexp : windows filename recognition

2019-10-10 Thread Ni Va
Don't understand why it returns 2 first chars on this example : + 20191009_191004_Vim.8.1.2125/ 4.0 KiB [D] 2019-10- echo substitute(getline(line('.')),'^..\zs\(.\+\)\(\s\+\d\+\.\d\+\)\@=.*$','\1', "")

Re: regexp : windows filename recognition

2019-10-09 Thread 'Andy Wokula' via vim_use
Am 09.10.2019 um 14:16 schrieb Ni Va: Anything chars contained in windows'filename before a lot of spaces and begining on third char after start of line. Anything chars of filename= \w\s-_. many times ^..filenamesome others chars.*$ /^..\zs.\+$ List of

Re: regexp : windows filename recognition

2019-10-09 Thread Ni Va
Anything chars contained in windows'filename before a lot of spaces and begining on third char after start of line. Anything chars of filename= \w\s-_. many times ^..filenamesome others chars.*$ Thank you Le mercredi 9 octobre 2019 14:09:25 UTC+2, aro...@vex

Re: regexp : windows filename recognition

2019-10-09 Thread arocker
> Here is a kind of filename in fat chars that I would like to recognize: > > * $FOOBBBAR_Ffbar_f_oobar_(2019-07-29) - Copie.zed.lnk* > 232.0 KiB 2019 There's a practically infinite universe of expressions that could be made to match it. What's distinctiv

regexp : windows filename recognition

2019-10-09 Thread Ni Va
Hi, Here is a kind of filename in fat chars that I would like to recognize: * $FOOBBBAR_Ffbar_f_oobar_(2019-07-29) - Copie.zed.lnk* 232.0 KiB 2019 Thank you -- -- You received this message from the "vim_use" maillist. Do not top-post!

Re: Puzzling regexp match

2017-10-29 Thread Lifepillar
On 29/10/2017 19:45, Dominique Pellé wrote: Lifepillar wrote: I might be missing something trivial, but I need others's eyes to look at it. Why are these patterns :echo match('x', "[)-~]") :echo match('x', "[(-~]") :echo match('x', "[(->]") :echo match('x', "[)->]") matching? It seems they m

Re: Puzzling regexp match

2017-10-29 Thread Dominique Pellé
Lifepillar wrote: > I might be missing something trivial, but I need others's > eyes to look at it. Why are these patterns > > :echo match('x', "[)-~]") > :echo match('x', "[(-~]") > :echo match('x', "[(->]") > :echo match('x', "[)->]") > > matching? It seems they match any character. > > Thanks,

Puzzling regexp match

2017-10-29 Thread Lifepillar
I might be missing something trivial, but I need others's eyes to look at it. Why are these patterns :echo match('x', "[)-~]") :echo match('x', "[(-~]") :echo match('x', "[(->]") :echo match('x', "[)->]") matching? It seems they match any character. Thanks, Life. -- -- You received this messag

Re: Playing with formatlistpat regexp atoms

2014-07-02 Thread Ben Fritz
On Thursday, July 3, 2014 12:38:04 AM UTC-5, Silas Silva wrote: > insert a "\\|" it stops to interpret it: > > > > set formatlistpat=\\(\\a\\|\\d\\)\\. > > > > This doesn't work. > YOu escaped just the '\' character. You also need to escape the '|' character to prevent it being used as a c

Playing with formatlistpat regexp atoms

2014-07-02 Thread Silas Silva
Hi all! After discovering great formatlistpat I started to play with, increasing it with my needs. But I found a problem regarding atoms, specifically the or operator (|) of them. See this problem: set formatlistpat=\\(\\a\\d\\)\\. This formatlistpat works for lists like "a2." "b7." and so on,

Re: regexp: different match, re=1 vs re=0

2013-08-25 Thread Bram Moolenaar
== > > > Result of re=1: Thisis[atest. > > > Result of re=0: Thisistest. > > > =

Re: regexp: different match, re=1 vs re=0

2013-08-23 Thread William Fugh
est. > > ==* > > Both of these regexp engines have the same result if the following > command > > line is used:-)* > > > --

Re: regexp: different match, re=1 vs re=0

2013-08-22 Thread Bram Moolenaar
> Thisis[atest. > = > Result of re=1: Thisis[atest. > Result of re=0: Thisistest. > ==* > Both of these regexp engines have the same result

Re: regexp: different match, re=1 vs re=0

2013-08-21 Thread Dominique Pellé
William Fugh wrote: > Version: 7.4, gVim, MS-DOS/MS-Windows > = > :%s#\[\(com\|ref\|ex\|p\|i\|u\|s\|b\)\]\zs\s\+\|\s\+\ze\[/\(com\|ref\|ex\|p\|i\|u\|s\|b\)\]\|[({]\zs\s\+\|\s\+\ze[)}]\|\s\zs\s\+\|\s\+\ze[,;.]\([^.,;]\)##g > --

regexp: different match, re=1 vs re=0

2013-08-21 Thread William Fugh
. = Result of re=1: Thisis[atest. Result of re=0: Thisistest. ==* Both of these regexp engines have the same result if the following command line is used

Re: Regexp help

2013-07-30 Thread Nikolay Pavlov
On Jul 30, 2013 7:26 PM, "Erik Christiansen" wrote: > > On 30.07.13 07:41, Ben Fritz wrote: > > The OP specifically said that valid decimals are "in the form 1.0D0, > > or more precisely \d\+\.\d\+D\d\+" so I didn't try stuff like "123." > > or ".123". > > Wot ... just trust the problem specificat

Re: Regexp help

2013-07-30 Thread Erik Christiansen
On 30.07.13 07:41, Ben Fritz wrote: > The OP specifically said that valid decimals are "in the form 1.0D0, > or more precisely \d\+\.\d\+D\d\+" so I didn't try stuff like "123." > or ".123". Wot ... just trust the problem specification? OK, the OP might be a mathematician or engineer, since fortra

Re: regexp help

2013-07-30 Thread Erik Christiansen
On 30.07.13 10:25, Charles Campbell wrote: > Erik Christiansen wrote: > >123 123.0 123. 456 0.123 .123 789 > Try... > /\<-\=[0-9]\+\ze\_s That fails here, also matching the fractional parts of the non-integers. The tweak of Ben Fritz's regex, on his second thread on this topic, seems to perform be

Re: Regexp help

2013-07-30 Thread Ben Fritz
On Tuesday, July 30, 2013 9:27:51 AM UTC-5, Erik Christiansen wrote: > On 30.07.13 06:57, Ben Fritz wrote: > > > Maybe better using "very magic": > > > > Everything's better with \v ;-) > > Yes. I occasionally edit portions of my .vimrc where I didn't used it, and wonder why. > > > \v<\

Re: Regexp help

2013-07-30 Thread Erik Christiansen
On 30.07.13 06:57, Ben Fritz wrote: > Maybe better using "very magic": Everything's better with \v ;-) > \v<\d+>\.@! On the test line: 123 123.0 123. 456 0.123 .123 789 that regex also detects the fractional parts as integers, so it still needs a tweak. This seems to do it: /\v\.@\.@! But

Re: regexp help

2013-07-30 Thread Charles Campbell
Erik Christiansen wrote: 123 123.0 123. 456 0.123 .123 789 Try... /\<-\=[0-9]\+\ze\_s Regards, Chip Campbell -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist

Re: Regexp help

2013-07-30 Thread Ben Fritz
On Tuesday, July 30, 2013 4:15:37 AM UTC-5, kilter wrote: > I have a fortran program in which there are two sorts of numbers, integers > which are simply digits not followed by a period, and double precision > numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would like to > search

Re: regexp help

2013-07-30 Thread kilter
> > I have a fortran program in which there are two sorts of numbers, > > > integers which are simply digits not followed by a period, and double > > > precision numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I > > would like to search for the former, avoiding the latter. > > >

Re: regexp help

2013-07-30 Thread Erik Christiansen
On 30.07.13 10:18, RICHARD PITMAN wrote: > Apologies if this is a re-post, I think the first went to the wrong address... > > I have a fortran program in which there are two sorts of numbers, > integers which are simply digits not followed by a period, and double > precision numbers in the form 1.

Re: regexp help

2013-07-30 Thread Marcin Szamotulski
On 11:37 Tue 30 Jul , Davido wrote: > RICHARD PITMAN wrote, on mar 30 jui 10:18 : > > > Apologies if this is a re-post, I think the first went to the wrong > > address... > > > > I have a fortran program in which there are two sorts of numbers, > > integers which are simply digits not foll

Re: regexp help

2013-07-30 Thread Davido
RICHARD PITMAN wrote, on mar 30 jui 10:18 : > Apologies if this is a re-post, I think the first went to the wrong address... > > I have a fortran program in which there are two sorts of numbers, > integers which are simply digits not followed by a period, and double > precision numbers in the

regexp help

2013-07-30 Thread RICHARD PITMAN
Apologies if this is a re-post, I think the first went to the wrong address... I have a fortran program in which there are two sorts of numbers, integers which are simply digits not followed by a period, and double precision numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would l

Regexp help

2013-07-30 Thread RICHARD PITMAN
I have a fortran program in which there are two sorts of numbers, integers which are simply digits not followed by a period, and double precision numbers in the form 1.0D0, or more precisely \d\+\.\d\+D\d\+ I would like to search for the former, avoiding the latter. Any suggestions gratefully re

Regexp engine comparison?

2013-07-16 Thread Tony Mechelynck
Hi. Has anyone got statistics on how the two regexp engines compare? I mean, the new engine was supposed to be faster, but I've seen a number of patches since then helping cases when it was much slower; in addition it seems to suffers from a number of bugs (one of which, with particu

A "\v" (Posix ERE) regex config mode for Vim [Was: Dealing with empty strings in regexp.]

2013-06-19 Thread Erik Christiansen
On 18.06.13 18:05, Paul Isambert wrote: > Mapping “/” to “/\v” (and, slightly more difficult, “:s/” to “:s/\v”) > is something I’ve thought abouth doing many times but have never done, > for some reason. Now that's a darned good idea! > I wish there were a “verymagic” option by default, I would h

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Paul Isambert
at the end of the string. Yes. My question simply was: is it consistent to optimize only at the end? > > As far as I’m concerned, I find the Perl way quite counter-intuitive, > > but what I’m interested in here is whether VimL is consistent or not. > > I.e., shouldn’t it work clear

Re: Dealing with empty strings in regexp.

2013-06-18 Thread LCD 47
ther? You came up with the concept of "ϵ", you fix its limitations. :) My conclusion to the above comparison is that Vim should apply the same optimisation in full, that is, kill the empty matches that touch the beginning of another match. As far as I can tell, that would be safe

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Paul Isambert
Erik Christiansen a écrit: > On 18.06.13 14:51, Paul Isambert wrote: > > The “*” operator should be banned, then! > > Does the problem with matching empty strings arise from using "*" when > "+" should be used instead? You are presumably aware that¹: > > * = 0 or more of the preceding atom. > +

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Ben Fritz
On Tuesday, June 18, 2013 7:51:06 AM UTC-5, Paul Isambert wrote: > > > Doing substitutions with a pattern that matches the empty string is > > > not useful, in real editing tasks it's not what is wanted. One is > > > always trying to match *something*. > > > > The “*” operator should be bann

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Erik Christiansen
On 18.06.13 14:51, Paul Isambert wrote: > The “*” operator should be banned, then! Does the problem with matching empty strings arise from using "*" when "+" should be used instead? You are presumably aware that¹: * = 0 or more of the preceding atom. + = 1 or more of the preceding atom. Thus "(a

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Paul Isambert
John Little a écrit: > On Tuesday, June 18, 2013 11:19:43 PM UTC+12, Paul Isambert wrote: > > > I.e., shouldn’t it work clearly one way or the other? > > I don't understand this "interspersed empty substrings" way of > looking at regexes; I suspect that it doesn't make sense some of the > time,

Re: Dealing with empty strings in regexp.

2013-06-18 Thread John Little
On Tuesday, June 18, 2013 11:19:43 PM UTC+12, Paul Isambert wrote: > I.e., shouldn’t it work clearly one way or the other? I don't understand this "interspersed empty substrings" way of looking at regexes; I suspect that it doesn't make sense some of the time, and is not useful, but my suspici

Re: Dealing with empty strings in regexp.

2013-06-18 Thread Paul Isambert
Sorry, this > print re.sub(re.compile('(a*)'), '(\\1)', 'abc') should be print re.sub(re.compile('([ac]*)'), '(\\1)', 'abc') Paul -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, vi

Dealing with empty strings in regexp.

2013-06-18 Thread Paul Isambert
Hello all, The following issue has been recently discussed on the Lua mailing list: http://lua-users.org/lists/lua-l/2013-04/msg00812.html (It has also been independantly raised on the LuaTeX list: http://tug.org/pipermail/luatex/2013-June/004418.html) If I understand correctly, any string can b

Re: regexp, ANN: explainpat

2012-12-19 Thread Andy Wokula
v0.2 is out! Am 19.12.2012 20:48, schrieb Christian Brabandt: On Mi, 19 Dez 2012, Christian Brabandt wrote: :ExplainPattern * if the pattern is in the clipboard) (needless to say: suggestions welcome) Very nice. Some observations: You already parse \v \V \m and \M but then you shoul

Re: regexp, ANN: explainpat

2012-12-19 Thread Christian Brabandt
On Mi, 19 Dez 2012, Christian Brabandt wrote: > > :ExplainPattern * > > if the pattern is in the clipboard) > > > > (needless to say: suggestions welcome) > > Very nice. Some observations: You already parse \v \V \m and \M but then you should also output the meaning of those atoms :%>l doe

Re: regexp, ANN: explainpat

2012-12-19 Thread Christian Brabandt
Hi Andy! On Mi, 19 Dez 2012, Andy Wokula wrote: > looks better with color, see > http://www.vim.org/scripts/script.php?script_id=4364 > > happy vimming :-) > > (or just > :ExplainPattern * > if the pattern is in the clipboard) > > (needless to say: suggestions welcome) Very nice. Mit fre

Re: explainpat (was: regexp)

2012-12-19 Thread David Fishburn
... > > > Now we have automatic explanation of such patterns: > > > > :ExplainPattern > \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)< > > > > Pattern: \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)< > ... > > http://www.vim.org/scripts/script.php?script_id=4364

Re: regexp

2012-12-19 Thread Tim Chase
On 12/19/12 08:44, Cesar Romani wrote: > On 18/12/2012 10:58 p.m., Tim Chase wrote: >> function! WriteShortcut(whole, name, url) >>call writefile(['[InternetShortcut]', 'URL='.(a:url), ''], >> (a:name).'.txt') >>return a:whole >> endfunction > > Thanks, it works fine. If the name contained

Re: explainpat (was: regexp)

2012-12-19 Thread Tim Chase
On 12/19/12 10:46, Andy Wokula wrote: > Am 19.12.2012 04:58, schrieb Tim Chase: >> %s/\c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)> submatch(3), submatch(2))/g > > Now we have automatic explanation of such patterns: > > :ExplainPattern > \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/

Re: regexp, ANN: explainpat

2012-12-19 Thread Andy Wokula
Am 19.12.2012 04:58, schrieb Tim Chase: %s/\c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\) Now we have automatic explanation of such patterns: :ExplainPattern \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)\1\s*>\([^<]*\)< Pattern: \c<\s*a\s\+href\s*=\(['"]\)\(\%(\1\@![^/]\)\+\)

Re: regexp

2012-12-19 Thread Cesar Romani
On 18/12/2012 10:58 p.m., Tim Chase wrote: > On 12/18/12 20:36, Cesar Romani wrote: >> If I have the following line: >> http://www.whatever.com";>SomeTitle >> >> How to create the file SomeTitle.txt with the content (without the >> dashes): >> >> [InternetShortcut] >> URL=http

Re: regexp

2012-12-18 Thread Tim Chase
On 12/18/12 20:36, Cesar Romani wrote: > If I have the following line: > http://www.whatever.com";>SomeTitle > > How to create the file SomeTitle.txt with the content (without the > dashes): > > [InternetShortcut] > URL=http://www.whatever.com > The other

Re: regexp

2012-12-18 Thread stosss
On Tue, Dec 18, 2012 at 10:23 PM, John Beckett wrote: > :s##[InternetShortcut]\rURL=\1# > Unless I am missing something you probably meant this. notice the > in the middle of the string next to the " :s#.\{-}#[InternetShortcut]\rURL=\1# -- You received this message from the "vim_use" maillist.

RE: regexp

2012-12-18 Thread John Beckett
Cesar Romani wrote: > If I have the following line: > http://www.whatever.com";>SomeTitle > > How to create the file SomeTitle.txt with the content (without the > dashes): > > [InternetShortcut] > URL=http://www.whatever.com > With the cursor on the line,

regexp

2012-12-18 Thread Cesar Romani
If I have the following line: http://www.whatever.com";>SomeTitle How to create the file SomeTitle.txt with the content (without the dashes): [InternetShortcut] URL=http://www.whatever.com Many thanks in advance, -- Cesar -- You received this message f

Re: Multi-colored regexp match highlighting

2012-02-14 Thread Paul
On Tuesday, 14 February, 2012 at 20:55:35 GMT, Eldar Yusupov wrote: Also, in case if regexp did not match I'd like to highlight the part of regexp which started matching prevention. I can't answer your other questions, but for this I usually enable incsearch, then either start co

Multi-colored regexp match highlighting

2012-02-14 Thread Eldar Yusupov
Hi, Is it possible to make VIM highlight defferently each group in the regexp matched text? Even more cool would be to highlight the regexp group at the command line with the same colors, so it's easy to associate regexp groups and their matched text. Also, in case if regexp did not matc

Re: RegExp - Matching comments doubt

2011-12-30 Thread Fernando Basso
On Dec 30, 5:06 pm, Ben Fritz wrote: > > >     g:// delete > > I honestly cannot say why this would work for you. It certainly does > not "work" for me, at least not in the way you seem to expect it to. > > I assume you meant :g// delete, which I tested, and it > only deleted the first line, as

Re: RegExp - Matching comments doubt

2011-12-30 Thread Ben Fritz
On Dec 30, 9:47 am, Fernando Basso wrote: > Suppose I have: > > ? > > This works: > >     g:// delete > I honestly cannot say why this would work for you. It certainly does not "work" for me, at least not in the way you seem to expect it to. I assume you meant :g// delete, which I tested, and

RegExp - Matching comments doubt

2011-12-30 Thread Fernando Basso
Suppose I have: ? This works: g:// delete But why isn't :g/

RegExp - transform text file into html.

2011-12-24 Thread Fernando Basso
I have file a file full of lines starting with #, sometimes a single line, sometimes multiple lines. They are followed by a snippet of code. Here's part of such a file: http://pastebin.com/w7zL45GM I want to to insert and before and after vim paragraphs in paragraphs that start with #. So far

Re: LOCALE settings and regexp classes

2010-12-14 Thread ZyX
Reply to message «Re: LOCALE settings and regexp classes», sent 15:49:23 14 December 2010, Tuesday by GoteGuru: > I've already tried [[:alpha:]] (not working), but \i and \k works like > a charm. Thank you very much. [:...:] classes does not work with unicode, only with ASCII. >

Re: LOCALE settings and regexp classes

2010-12-14 Thread GoteGuru
> You can try using [[:alpha:]] or \i or \k. > See :help whitespace, note the remark just above that. I've already tried [[:alpha:]] (not working), but \i and \k works like a charm. Thank you very much. However its a bit strange 'cause \i should be used environment variable checking, where natio

Re: LOCALE settings and regexp classes

2010-12-13 Thread Bram Moolenaar
néz". > > Am I miss some setting or this cannot be done? > > While googling I found that range expression [a-z] is not well defined > in different regexp implementations. I think thats ok, but vim > should be *intuitive* and even if [a-z] not defined, vim should use the >

LOCALE settings and regexp classes

2010-12-12 Thread Mészáros Gergely
this cannot be done? While googling I found that range expression [a-z] is not well defined in different regexp implementations. I think thats ok, but vim should be *intuitive* and even if [a-z] not defined, vim should use the local collation. (It does not). Ok, I thought, there are no wonders, l

Re: non-trivial regexp needed, please help

2010-01-07 Thread Peter Princz
weird if turned on, but that is not important at all here, goal is to find a line quickly in a huge file. Once again, thank you very much. Have a nice day, Peter 2010/1/4 Matt Wozniski > On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote: > >> I am trying to put together a regexp to fi

Re: non-trivial regexp needed, please help

2010-01-05 Thread Christian Brabandt
Hi Matt! On Mo, 04 Jan 2010, Matt Wozniski wrote: > On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote: > >> I am trying to put together a regexp to find pieces of text within one > >> line, > >> but I do not know their order. > ... > >> Also, best

Re: non-trivial regexp needed, please help

2010-01-04 Thread Matt Wozniski
On Mon, Jan 4, 2010 at 1:12 PM, Tim Chase wrote: >> I am trying to put together a regexp to find pieces of text within one line, >> but I do not know their order. ... >> Also, best if it would be flexible enough to support arbitrary number of >> samples without much t

Re: non-trivial regexp needed, please help

2010-01-04 Thread Tim Chase
> I am trying to put together a regexp to find pieces of text within one line, > but I do not know their order. > > So far, > /^.*sample1\|sample2.*sample2\|sample1 Given the lower priority of "\|" in parsing this is 1) any line containing "sample1" 2) or an

non-trivial regexp needed, please help

2010-01-04 Thread Peter Princz
Hello VimWorld, first, a Happy New Year to this wonderful list. ...but I have a problem, maybe you can help. I am trying to put together a regexp to find pieces of text within one line, but I do not know their order. So far, /^.*sample1\|sample2.*sample2\|sample1 is my best bet but I am still

Re: using regexp to search for Unicode code points and properties

2009-08-30 Thread Tony Mechelynck
Warning: this reply is in UTF-8. On 20/08/09 15:47, Brian Anderson wrote: > > I'm interested in learning how to use regular expressions in Vi(m) to > search for Unicode code points. > > In a book about regexp, it describes how to search for Unicode code > points by various

Re: using regexp to search for Unicode code points and properties

2009-08-20 Thread Jürgen Krämer
Hi, Brian Anderson wrote: > I read through the help files on /\%u, but now I have a question about > searching for composing or combining characters. > > I have a Cyrillic text, using UTF-8 as the encoding, and the characters > are appearing correctly on the screen. > > When I select a chara

Re: using regexp to search for Unicode code points and properties

2009-08-20 Thread Brian Anderson
I read through the help files on /\%u, but now I have a question about searching for composing or combining characters. I have a Cyrillic text, using UTF-8 as the encoding, and the characters are appearing correctly on the screen. When I select a character and press ga, it gives me the decimal

Re: using regexp to search for Unicode code points and properties

2009-08-20 Thread Brian Anderson
Thanks Dennis & Jurgen, I thought it was probably in the help files, but I couldn't find it. Brian --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~

Re: using regexp to search for Unicode code points and properties

2009-08-20 Thread Dennis Benzinger
Am 20.08.2009 15:47, Brian Anderson schrieb: > I'm interested in learning how to use regular expressions in Vi(m) to > search for Unicode code points. > > In a book about regexp, it describes how to search for Unicode code > points by various means, and for various p

Re: using regexp to search for Unicode code points and properties

2009-08-20 Thread Jürgen Krämer
Hi, Brian Anderson wrote: > I'm interested in learning how to use regular expressions in Vi(m) to > search for Unicode code points. > > In a book about regexp, it describes how to search for Unicode code > points by various means, and for various programming lang

using regexp to search for Unicode code points and properties

2009-08-20 Thread Brian Anderson
I'm interested in learning how to use regular expressions in Vi(m) to search for Unicode code points. In a book about regexp, it describes how to search for Unicode code points by various means, and for various programming languages. The book describes searching for a specific Unicode

Re: Syntax Highlighting / Regexp

2009-08-17 Thread Arco
atch >   syntax keyword myTag Mon Tue Wed > > regards, > Peter > > --- On Mon, 17/8/09, Arco wrote: > > > > > From: Arco > > Subject: Syntax Highlighting / Regexp > > To: "vim_use" > > Received: Monday, 17 August, 2009, 2:07 PM > &

Re: Syntax Highlighting / Regexp

2009-08-17 Thread Peter Hodge
Arco > Subject: Syntax Highlighting / Regexp > To: "vim_use" > Received: Monday, 17 August, 2009, 2:07 PM > > I'm setting up syntax highlighting for a custom file > type.  Everything > works great except this regexp: > >     syntax match myTag /Mon|

Re: Syntax Highlighting / Regexp

2009-08-16 Thread bill lam
On Sun, 16 Aug 2009, Arco wrote: > > I'm setting up syntax highlighting for a custom file type. Everything > works great except this regexp: > > syntax match myTag /Mon|Tue|Wed/ > > 'myTag' is supposed to match "Mon" or "Tue" or &

Syntax Highlighting / Regexp

2009-08-16 Thread Arco
I'm setting up syntax highlighting for a custom file type. Everything works great except this regexp: syntax match myTag /Mon|Tue|Wed/ 'myTag' is supposed to match "Mon" or "Tue" or "Wed" - but it won't work. My workaround is to have th

Re: syntax file regexp involving field delimiters

2009-06-05 Thread Keith Kaple
nd got the first number > and timestamp via syn match, but then thought there is probably an easier way > to do regexp tagging on the fields based on the delimeter character, but I > can't seem to figure out the regexp syntax. > > 1 | timestamp | 001| text4 | text5 | text6 | te

Re: syntax file regexp involving field delimiters

2009-06-05 Thread Andy Wokula
Keith Kaple schrieb: > Ok, I give up ;-) > > I'm trying to write a syntax file for a "pipe" delimeted file, lines > look something like the example below. I started off ok and got the > first number and timestamp via syn match, but then thought there is > pr

Re: syntax file regexp involving field delimiters

2009-06-04 Thread Christian Brabandt
as interpreted as "or" but not sure if that is correct in this > flavor of regexp. Close. You need to use \+ as quantifier for 1 or more occurrences of the previous atom. See help /\+ So this should match: syn match FieldFour "^[^|]\+|[^|]\+|[^|]\+|[^|]\+|" Note however tha

syntax file regexp involving field delimiters

2009-06-04 Thread Keith Kaple
Ok, I give up ;-) I'm trying to write a syntax file for a "pipe" delimeted file, lines look something like the example below. I started off ok and got the first number and timestamp via syn match, but then thought there is probably an easier way to do regexp tagging on the

Re: Syntax match/highlight/regexp issue

2009-04-07 Thread Stahlman Family
Maxim Kim wrote: > On 7 апр, 02:58, Brett Stahlman wrote: >> Use a look-behind assertion... >> \%(||\)\@<= >> ...instead of... >> ||\zs >> > > Thanks a lot! > I thought that using \zs is the same as \@<= (as written in the :help / > \@<= ). The difference is that the portion of the pattern to

Re: Syntax match/highlight/regexp issue

2009-04-06 Thread Maxim Kim
On 7 апр, 02:58, Brett Stahlman wrote: > Use a look-behind assertion... > \%(||\)\@<= > ...instead of... > ||\zs > Thanks a lot! I thought that using \zs is the same as \@<= (as written in the :help / \@<= ). --~--~-~--~~~---~--~~ You received this message from th

Re: Syntax match/highlight/regexp issue

2009-04-06 Thread Brett Stahlman
ed attribute simply ensures that wikiBold will never match except where permitted by the nextgroup.) Brett Stahlman > > Is there a way I can have both of them highlighted? > > PS > wikiBold regexp is greatly simplified just to show the problem, I mean > I can't drop out \zs part of

Syntax match/highlight/regexp issue

2009-04-06 Thread Maxim Kim
/||/ Oops, || are highlighted but *bold* part goes away. Is there a way I can have both of them highlighted? PS wikiBold regexp is greatly simplified just to show the problem, I mean I can't drop out \zs part of it. --~--~-~--~~~---~--~~ You received this message fro

Re: syntax coloring regexp

2008-12-20 Thread acarchau.nab...@gmail.com
In my ignorance I filed a bug report, Bram pointed out that this restriction in mentioned in :help syn-multi-line, the \zs causes the problem above. --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www

Re: syntax coloring regexp

2008-12-19 Thread Ben Schmidt
with line breaks, and the following text > remains unchanged: > > ; > > *adsafasff; > > The regexp starting the comment appears to be finding the right > pattern. > > Is there any way I can handle line breaks? I'm not sure why it doesn't work...but I suggest

Re: syntax coloring regexp

2008-12-19 Thread Tony Mechelynck
m=NONE ctermfg=Red ctermbg=Black > gui=NONE guifg=Red guibg=White > syn sync fromstart > > > With the above, the following line gets colored correctly: > ; *adsafasff; > > with everything between the asterisk and the semi-colon colored red. > > However, it cannot deal wi

syntax coloring regexp

2008-12-18 Thread acarchau.nab...@gmail.com
between the asterisk and the semi-colon colored red. However, it cannot deal with line breaks, and the following text remains unchanged: ; *adsafasff; The regexp starting the comment appears to be finding the right pattern.. Is there any way I can hand

Re: Regexp to cut a line in many parts

2008-10-31 Thread Kazuo Teramoto
On Thu, Oct 30, 2008 at 7:28 PM, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > > It would be easy... except that you'd probably want to do it > right-to-left, so that the extra single digit or pair of digits be at > the left end rather than at the right one. Let's see... > > What about > >:s

Re: Regexp to cut a line in many parts

2008-10-31 Thread jice
:s/\(\d\{1,3}\)\ze\%(\d\d\d\)\+\%(\D\|$\)/\1,/g > > This was not what I asked for but I keep it preciously. It may be very useful... And very rich for regexp study :) While looking at it, I could simplify it in the Tim's way ;) :s/.\{1,3}\ze\(...\)\+$/&,/g It's true that this o

Re: Regexp to cut a line in many parts

2008-10-30 Thread Tony Mechelynck
On 30/10/08 08:56, jice wrote: > > Hi, > I have very long lines made of numbers like this : > 0324143287911321346876841651023146579841265165769 > I'd like to know if there is a regexp sub expression that can cut this every > 3 characters in one single command ? > I

RE: Regexp to cut a line in many parts

2008-10-30 Thread Gene Kwiecinski
>For the OP, you also don't mention how you'd like them split: by >newline, or by spaces (which your pseudo-regexp does), so you >might want to use > > :%s/.../& /g Yah, and just to expound on the point a little more, it can be replaced with anything. Eg

Re: Regexp to cut a line in many parts

2008-10-30 Thread jice
mbers like this : >>> 0324143287911321346876841651023146579841265165769 >>> I'd like to know if there is a regexp sub expression that >>> can cut this every 3 characters in one single command? >> >> :s/.\{3}/&\r/g >> >> I believe we have

Re: Regexp to cut a line in many parts

2008-10-30 Thread Tim Chase
>> I have very long lines made of numbers like this : >> 0324143287911321346876841651023146579841265165769 >> I'd like to know if there is a regexp sub expression that >> can cut this every 3 characters in one single command? > > :s/.\{3}/&\r/g > >

Re: Regexp to cut a line in many parts

2008-10-30 Thread jice
Thank you all guys, all these work perfectly well (love regexp :) xulxer wrote: > > > Hi, > On Thu, Oct 30, 2008 at 12:56:14AM -0700, jice wrote: >> >>Hi, >>I have very long lines made of numbers like this : >>0324143287911321346876841651023146579841265165

RE: Regexp to cut a line in many parts

2008-10-30 Thread John Beckett
jice wrote: > I have very long lines made of numbers like this : > 0324143287911321346876841651023146579841265165769 > I'd like to know if there is a regexp sub expression that > can cut this every 3 characters in one single command? :s/.\{3}/&\r/g I believe we have to th

Re: Regexp to cut a line in many parts

2008-10-30 Thread A. S. Budden
2008/10/30 jice <[EMAIL PROTECTED]>: > > > Hi, > I have very long lines made of numbers like this : > 0324143287911321346876841651023146579841265165769 > I'd like to know if there is a regexp sub expression that can cut this every > 3 characters in one sin

  1   2   >