0

I have a list of generated output which contains text such as this line:

D:/some_path1/filename.o D:/some_path2/filename.d D:/some_path3/filename.c; $(build-c-file)

D:/some_path1/filename2.o D:/some_path2/filename2.d D:/some_path3/filename3.asm; $(build-s-file)

etc(more of such lines)

where some_path1,2,3 are different. Basically the object go to path1, .d's(no ideea what those are) go to path2 and sources(.c or .asm) go to path3. Where the line ends with $(build-c-file) means that there was a .c file generated. Where the line ends with $(build-s-file) means that there was a .asm file generated.

I'm interested in only obtaining the c files from this list so I can include them in some script I'm writing. Basically I just want to get a list which would ressemble this:

D:/some_path/filename.c;
D:/some_path/filename1.c;

I know this is very easy to do with RegEx expressions. I have tried playing in regexr.com however I'm not good with them and I couldn't obtain my desired output :(.

I have tried things like: D:/*.c and others but I could not come up with an expression that does what I want.

Please help me with a regex expression that would give me what I want. Thank you very much for reading my post!

Dharman
  • 30,962
  • 25
  • 85
  • 135
Kennedy
  • 277
  • 2
  • 7
  • 21

0 Answers0