I got a whole list of those lines:
randomtext1', 'somethingelsehere', 'randomtext2', 'link-to-something', 'random-date', 'randomdate2', 'randomname'),
and I want to be able to extract one of those entrys.
somethingelsehere, link-to-something, ...
So I tried using http://regexr.com/ to get the regexcode that works for this, but i can't figure it out.
My thought was that I could simply "mark" the things I want by saying ignore the first, second and third '
then start at the fourth '
until the fifth '
and ignore the sixth to thirteenth again. That should give me randomtext2
.
The problem is, that sometimes there is nothing in between the ''
, but I want to get that aswell The ''
should be included in this so that I would get 'randomtext2'
instead of randomtext2
.
I tried to understand regex, but it really is extremly complex and pretty hard to understand for me so help would be really appreciated :)
xF4m3
Edit1: Example lines: line 1: 3d-furnaces', '', 'spAnser', 'minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288346-3d-furnace-v1-4', '2015-09-27 13:41:50', '2015-09-27 13:41:50', '3D Furnaces'), line 2: 4space', 'No idee what to put here, but it sometimes is there', '4spaceTeam', '4space.mods.center/#download', '2015-09-27 15:45:27', '2015-09-27 15:45:27', '4Space'),
I want to extract 'spAnser' and 'minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288346-3d-furnace-v1-4' from the first line and '4spaceTeam' and 'mods.center/#download' from the second line.
See http://pastebin.com/7tGJB7kh for a better list
I Used regexr.com aswell as regex101.com I need to extract the 3rd and fourth group "(.?) (.?) (.?) (.?) (.?) (.?), (.?), (.?)," that is my regex code to mark all groups, i do not know how i can exclude group 1-3 and 5-8. Examples can be found on pastebin.