Good day.

There are lines of type

"C:\users\downloads\1.txt""1460577050""63f9fa2d3e3b5bc31cc3663e4cc7167f1d763c6fa880943e5995fda8a34bd030" 

I try to pull out in regular expression everything that is in quotes. I use about the following regular expression:

 regex mask("\"{1}['_'' ''\\'':''.'[:alnum:]]+\"{1}"); 

but it misses the path, as it turned out at random, she does not like something in slashes.

What to fix to get the desired result?

  • you have two blank lines in quotes, however - splash58
  • Did not see where exactly? - TheJokiv

1 answer 1

Well, if in quotes you cannot have double quotes ("") and the format of strings does not change, you can do this :
^"([^"]*)""([^"]*)""([^"]*)"

  • And if there are four elements inside the quotes? 5, 6? - ReinRaus
  • ... then this should be indicated in the question. - Alekcvp
  • There will be only 3 items. I'm more interested in how to insert it into the meaning of an expression, I swear at a blunt substitution. - TheJokiv
  • "\"([^\"]*)\"\"([^\"]*)\"\"([^\"]*)\"" - so it curses too? - Alekcvp
  • In general, I changed the mask version a bit: regex mask ("\" ([^ \ "] *) \" "); so it pulls out what's needed, alternately using regex_search, thanks) - TheJokiv