Re: Using regexp to search

2011-08-29 Thread David Patrick Henderson
On 29 Aug 2011, at 15:50, Carl Jacobsen wrote: >- must escape a literal '-' inside character classes, otherwise > it's interpreted to be specifying part of a range Strictly speaking not true. It is considered best practice in regexs that if the ‘-' is to be included in the expression c

Re: Using regexp to search

2011-08-29 Thread Carl Jacobsen
On Wed, 24 Aug 2011, consiglieri wrote: I want to use the following regexp \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b Others have already pointed you towards Vim's help (go read ':h regexp', it's definitely worth the effort); for the specifics of your regexp, in Vim, I'm guessing you want:

Re: Using regexp to search

2011-08-24 Thread Charles Campbell
consiglieri wrote: Hi I have not previously used Macvim for regexp searching (only BBedit). I can't seem to understand how to enter the regexp. I want to use the following regexp \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b when I try it in vim I never get any hits. I guess I'm doing something

Re: Using regexp to search

2011-08-24 Thread Steven Michalske
http://www.vim.org/scripts/script.php?script_id=3282 might help. I am sure there are other vim scripts to extend regex, to the flavor of regex you want. Steve On Aug 24, 2011, at 6:11 AM, consiglieri wrote: > Hi > > I have not previously used Macvim for regexp searching (only BBedit). > I ca

Re: Using regexp to search

2011-08-24 Thread Marcin Sztolcman
On 24 sie 2011, at 15:11, consiglieri wrote: > I have not previously used Macvim for regexp searching (only BBedit). > I can't seem to understand how to enter the regexp. > > I want to use the following regexp > > \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b Vim has a little other regexp syntax (

Re: Using regexp to search

2011-08-24 Thread Andrew Stewart
On 24 Aug 2011, at 15:11, consiglieri wrote: > I want to use the following regexp > > \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b > > when I try it in vim I never get any hits. > > I guess I'm doing something wrong when entering it. > I would be very grateful if someone could show me how i enter