We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Uppercase letter - regexp

Hi,
Does anyone have an idea for a regexp to validate that the first letter of a word will be uppercase (e.g. if I wand to enforce sites to write medication names starting with capital letter)
Thanks,
Shmulik

Best regards,
Shmulik Adler
Clinical Trials Manager.
****************************************
A. Stein - Regulatory Affairs Consulting
Beit Hapaamon (Suite 102)
20 HaTaas Str. (P.O.B. 124)
Kfar Saba 44425 ISRAEL
Tel: +972-9-7670002
Fax: +972-9-7668534
E-mail: [email protected]
*****************************************
This message and any included attachments are from A. Stein - Regulatory Affairs Consulting and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing,copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail.

Comments

  • aabergaaaberga Posts: 24
    On 29 Jul 2010, at 13:08, Shmulik wrote:
    > > Hi,
    > > Does anyone have an idea for a regexp to validate that the first letter of a word will be uppercase (e.g. if I wand to enforce sites to write medication names starting with capital letter)
    > > Thanks,
    > > Shmulik
    > >
    > > Best regards,
    > >
    > > Shmulik Adler
    > >
    > > Clinical Trials Manager.
    Hi,
    I would try something like
    [A-Z]*[\w]*
    HTH,
    Aldo
  • aabergaaaberga Posts: 24
    On 29 Jul 2010, at 13:19, Aldo Bergamini wrote:
    > > Hi,
    > >
    > > I would try something like
    > >
    > > [A-Z]*[\w]*
    > >
    > > HTH,
    > > Aldo
    Or even better:
    [A-Z][\w]*
    without the first '*', meaning that you are really looking for one character in the set from A to Z and then any sequence of 'word characters'.
    If you have a Mac I would recommend trying it out on BBEdit or on the free TextWrangler apps from Bare Bones ... (no link with them, other than being a user since ever).
    Regards,
    Aldo
  • smadlersmadler Posts: 105
    Thanks,
    I checked them but unfortunately they are not working properly.
    Shmulik
    -----Original Message-----
    On Behalf Of Aldo Bergamini
    Sent: Thursday, July 29, 2010 2:32 PM
    To: [email protected]
    Subject: Re: [Users] Uppercase letter - regexp
    On 29 Jul 2010, at 13:19, Aldo Bergamini wrote:
    > > Hi,
    > >
    > > I would try something like
    > >
    > > [A-Z]*[\w]*
    > >
    > > HTH,
    > > Aldo
    Or even better:
    [A-Z][\w]*
    without the first '*', meaning that you are really looking for one character
    in the set from A to Z and then any sequence of 'word characters'.
    If you have a Mac I would recommend trying it out on BBEdit or on the free
    TextWrangler apps from Bare Bones ... (no link with them, other than being a
    user since ever).
    Regards,
    Aldo
  • Hi Shmulik,
    If you can be more specific with the requirement, that would be helpful.
    Assuming that you want one word with no whitespace, and the first letter
    must be uppercase, you may want something that looks like this:
    Regexp: /[A-Z][a-z]+/
    This is validating : 1st character is uppercase letter and matches only
    once. Second character is lowercase letter a-z and must match one or
    more times.
    Best,
    Alicia
    . . . . . . . . . . . . . . . . . . . . . . . . . . .
    Alicia Goodwin
    Client Services Representative
    Akaza Research, LLC
    460 Totten Pond Rd. Suite 200
    Waltham, MA 02451

    Phone: 781.547.8424
    Email: [email protected]
    -----Original Message-----
    [mailto:[email protected]] On Behalf Of Shmulik
    Sent: Thursday, July 29, 2010 9:26 AM
    To: [email protected]
    Subject: RE: [Users] Uppercase letter - regexp
    Thanks,
    I checked them but unfortunately they are not working properly.
    Shmulik
    -----Original Message-----
    [mailto:[email protected]]
    On Behalf Of Aldo Bergamini
    Sent: Thursday, July 29, 2010 2:32 PM
    To: [email protected]
    Subject: Re: [Users] Uppercase letter - regexp
    On 29 Jul 2010, at 13:19, Aldo Bergamini wrote:
    > > Hi,
    > >
    > > I would try something like
    > >
    > > [A-Z]*[\w]*
    > >
    > > HTH,
    > > Aldo
    Or even better:
    [A-Z][\w]*
    without the first '*', meaning that you are really looking for one
    character in the set from A to Z and then any sequence of 'word
    characters'.
    If you have a Mac I would recommend trying it out on BBEdit or on the
    free TextWrangler apps from Bare Bones ... (no link with them, other
    than being a user since ever).
    Regards,
    Aldo
This discussion has been closed.