-
Regular Expression
I've attempted to develop a regular expression to extract a file name from
a file path without any success!
For example, from the following file path I wish to extract the following
string:
input string: c:\temp\foo.txt
extract: foo
or
input string: c:\temp\foo\g1232.jpg
extract: g1232
Any ideas
Robert
-
Re: Regular Expression
You'll find it much easier to use the Path class'
GetFilenameWithoutExtension method.
"Robert" <qbert@hotmail.com> wrote in message
news:3f16c120$1@tnews.web.devx.com...
>
> I've attempted to develop a regular expression to extract a file name from
> a file path without any success!
>
> For example, from the following file path I wish to extract the following
> string:
>
> input string: c:\temp\foo.txt
> extract: foo
>
> or
>
> input string: c:\temp\foo\g1232.jpg
> extract: g1232
>
> Any ideas
>
> Robert
-
Re: Regular Expression
If possible, I would like to extract the aforementoined during a transform
from within an XSL template, using XPath's regex functions.....
"Russell Jones" <arj1@nospam.northstate.net> wrote:
>You'll find it much easier to use the Path class'
>GetFilenameWithoutExtension method.
>
>
>"Robert" <qbert@hotmail.com> wrote in message
>news:3f16c120$1@tnews.web.devx.com...
>>
>> I've attempted to develop a regular expression to extract a file name
from
>> a file path without any success!
>>
>> For example, from the following file path I wish to extract the following
>> string:
>>
>> input string: c:\temp\foo.txt
>> extract: foo
>>
>> or
>>
>> input string: c:\temp\foo\g1232.jpg
>> extract: g1232
>>
>> Any ideas
>>
>> Robert
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks