Regular Expression Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Robinson

    Regular Expression Question

    Hello,

    I need a regular expression that will match all files which aren't of
    two extensions. Basicly I need it to mean not *.a nor *.csv.

    The best I can come up with based on books and online sources is
    [^[*.m][*.csv]] but that doesn't look quite right.

    Does anyone know what the proper regular expression is?

    thanks for any help in advance,
    Geoff
  • dw

    #2
    Re: Regular Expression Question


    "Geoff Robinson" <geoffr2@aol.co m> wrote in message
    news:978b35e2.0 311211012.47519 5eb@posting.goo gle.com...[color=blue]
    > Hello,
    >
    > I need a regular expression that will match all files which aren't of
    > two extensions. Basicly I need it to mean not *.a nor *.csv.
    >
    > The best I can come up with based on books and online sources is
    > [^[*.m][*.csv]] but that doesn't look quite right.[/color]

    not matching *.a or *.csv:

    ! /\.(a|csv)$/





    Comment

    • Geoff Robinson

      #3
      Re: Regular Expression Question

      thanks

      "dw" <me@verizon.inv alid> wrote in message news:<hswvb.229 9$Cw.761@nwrddc 02.gnilink.net> ...[color=blue]
      > "Geoff Robinson" <geoffr2@aol.co m> wrote in message
      > news:978b35e2.0 311211012.47519 5eb@posting.goo gle.com...[color=green]
      > > Hello,
      > >
      > > I need a regular expression that will match all files which aren't of
      > > two extensions. Basicly I need it to mean not *.a nor *.csv.
      > >
      > > The best I can come up with based on books and online sources is
      > > [^[*.m][*.csv]] but that doesn't look quite right.[/color]
      >
      > not matching *.a or *.csv:
      >
      > ! /\.(a|csv)$/[/color]

      Comment

      Working...