?
Solved

Quick Regex syntax question....

Posted on 2005-03-16
2
Medium Priority
?
239 Views
Last Modified: 2010-04-23
i am trying to use this regex
 Dim filetest As New Regex(".*(?<filename>\"".*\"").*")

to retrieve the file name between quotes out of strings like these

Concord Dawn - Disturbance (2001) [192] - yEnc [7/9] - "07 Guardian Angel.mp3" (04/10)
'REQ: Yearmix 2004 from DJ Sandstorm. 3CD's from Ben Liebrand [004/158] - yEnc "Ben Liebrand - Grandmix 90's Edition.part003.rar" (12/16)

the above regex does not work, any ideas?
0
Comment
Question by:addicktz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Expert Comment

by:S-Twilley
ID: 13562349
Dim filetest As New Regex("""(?<filename>[^""]*)""")

I think.. will double check that now
0
 
LVL 12

Accepted Solution

by:
S-Twilley earned 2000 total points
ID: 13562364
seems to work for me.... this doesn't capture the quotes in the expression...

if you want to include the quotes then:

Dim filetest As New Regex("(?<filename>""[^""]*"")")

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question