1

I'm trying to get the fields of a file that looks like this:

name 00 "helo-WORLD.01   " "pass   " FF000000 DD111111

I'm tryign to do it with QRegExp but I dont find the regular expression that matches everything between blanks or everything inside "".

For the quotes I was trying sth like

 \"[A-Za-z\\-\\.0-9]\" 

but it doesnt work either.

Thank you for any support!!

Alan Moore
  • 73,866
  • 12
  • 100
  • 156
republicca
  • 43
  • 1
  • 8

1 Answers1

0

I would go for a different approach.

Maybe you can use the split function and cut it along the " character and select the desired fields.

A Regex approach could also be s/^[a-z0-9\\s]+\"\|\"[A-F0-9\\s]+$//g quite ugly an inefficient and will also leave you with the internal quotation marks (unless you will reprocess it to remove those as well or include it in this regex which will turn it into a very long expression).

Hope that's good enough.

Yaron
  • 1,199
  • 1
  • 15
  • 35