In brief, I am puzzled as to why ~^[0-9]*?\|[0-9]*?\|.*?\|.*?\..*?\|2\|[0-9]\|.*?$~m
matches 1362526368|5|Corinne E. Fischer|fischer.jpg|3|3|FischerC@smh.ca|416-864-5320|1|2|3|4|5
Note the |3| after fischer.jpg when the pattern clearly has a \|2\| in that location. Now I understand that it must be the numbers at the end that are messing with the match but I don't really know how to fix it (the numbers at the end don't have to be numbers but can be any characters). This shouldn't be an issue later when I fill in proper data but I just want to know where I'm going wrong for future reference and for my peace of mind.
If you want I can include my original data as well as my complete pattern (I made this one just to test my theory).
Thank you for your time, evidently I'm not very good with regex.