• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Quick Regex syntax question....

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
addicktz
Asked:
addicktz
  • 2
1 Solution
 
S-TwilleyCommented:
Dim filetest As New Regex("""(?<filename>[^""]*)""")

I think.. will double check that now
0
 
S-TwilleyCommented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now