using sed;

echo 'some eXampel tExt' | sed 's/^[A-Z]//;s/[a-z ]//g'

--
- Shaker

On Tue, Jun 29, 2010 at 6:02 PM, Al-Faisal El-Dajani <
[email protected]> wrote:

> Hello all,
>
> I'm trying to write a regular expression, and facing a little problem with
> it. I want to find all upper case letters in a string, except that the first
> character in the string should be ignored (case insensitive to me).
>
> Example: "Some eXampel tExt." I want to get the X and the E, but not the S
> at the beginning of the string.
>
> I can get all upper case letters, and ignore the first instance
> programmatically, but that is not lazy enough for me.
>
> I read about "negative look ahead" grouping: ^(?![A-Z]), but I honestly
> don't understand how this works, or how to tell it to get the rest of the
> upper case letters.
>
> Any regex gurus care to shed a light here?
>
> Thanx.
> --
> Al-Faisal El-Dajani
> 10/6
>
> --
> ### Jordan Linux Users Group ###
> http://Jolug.org/
> http://groups.google.com/group/Jolug
>
> ### Ubuntu Jordan LoCo Team ###
> https://wiki.ubuntu.com/JordanTeam
> http://lists.ubuntu.com/ubuntu-jo
>
> ### Ojuba Linux ###
> http://ojuba.org/
>
> ### Jordan PHP ###
> http://groups.google.com/group/JoPHP

-- 
### Jordan Linux Users Group ###
http://Jolug.org/
http://groups.google.com/group/Jolug

### Ubuntu Jordan LoCo Team ###
https://wiki.ubuntu.com/JordanTeam
http://lists.ubuntu.com/ubuntu-jo

### Ojuba Linux ### 
http://ojuba.org/

### Jordan PHP ###
http://groups.google.com/group/JoPHP

رد على