regex

  • Thread starter Thread starter Francesco
  • Start date Start date
F

Francesco

Hi to all,
someone of you has a regular expression for image file in Asp.NET C# ?

Thanks
Francesco
 
Hi Francesco,

I won't proclaim to be a regex expert, but I'll give it a go:

+?\.(?i:jpg|jpeg|gif|png|bmp)

Add other file extensions as needed.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
| From: "Francesco" <[email protected]>
| Subject: regex
| Date: Fri, 12 Nov 2004 16:36:26 +0100
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.181
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 217.72.108.2
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275605
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi to all,
| someone of you has a regular expression for image file in Asp.NET C# ?
|
| Thanks
| Francesco
|
|
|
 
Francesco,

Can you provide more details? What happened when you tried it?

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
| From: "Francesco" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: regex
| Date: Fri, 12 Nov 2004 17:21:49 +0100
| Lines: 52
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.181
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 217.72.108.2
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275626
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks for the answer but do not go well.
| I have tried also
|
| | > Hi Francesco,
| >
| > I won't proclaim to be a regex expert, but I'll give it a go:
| >
| > +?\.(?i:jpg|jpeg|gif|png|bmp)
| >
| > Add other file extensions as needed.
| >
| > Jim Cheshire [MSFT]
| > MCP+I, MCSE, MCSD, MCDBA
| > ASP.NET Developer Support
| > (e-mail address removed)
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| >
| > --------------------
| > | From: "Francesco" <[email protected]>
| > | Subject: regex
| > | Date: Fri, 12 Nov 2004 16:36:26 +0100
| > | Lines: 7
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.3790.181
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 217.72.108.2
| > | Path:
| >
|
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
| > phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
| microsoft.public.dotnet.framework.aspnet:275605
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hi to all,
| > | someone of you has a regular expression for image file in Asp.NET C# ?
| > |
| > | Thanks
| > | Francesco
| > |
| > |
| > |
| >
|
|
|
 
Back
Top