Friday, August 9, 2013

Re: Match all characters enclosed in brackets

Sorry, I missed the 2nd half of your email:

On 2013-08-09 00:46, rameo wrote:
> I have trouble finding the correct regex.
> p.e.

I'm not sure what "p.e." is supposed to mean in this context.

> Match first an uppercase character then all lowercase characters
> with at least 1 uppercase character This would be easier if the
> sequence of characters enclosed in brackets aren't optional.
>
> Something like this:
> \u[a-zA-Z]

That would work, though it sounds like you want to ensure that
there's at least one lowercase character, so you'd want something like

\u\a*\l\a*

or possibly one uppercase letter among the remainder, in which case
you'd do

\u\a*\u\a*

possibly changing "*" to "\+" if you want to assert that you don't
want things like "HI"

-tim


--
--
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.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: