Which you can see everything pretty much ends in a comma or a ]. This extra editing before my parse is becoming tedious, can someone help me get this to work using the same junk source from above?This is one way (amongst many). You could use the substitution operator to inject a newline character wherever you have '],'.
use strict; use warnings; while (<DATA>) { chomp; s/;/;\n/g; s/],/],\n/g; print; } __DATA__ window.Grid1 = new ComponentArt_Grid('Grid1'); Grid1.Data = [[33,'DOR00393','ActiveState ActivePerl 5.8.8 Build 819', +0,'Software','No','Yes','No','Yes','Yes','No','No','No','No','No'],[4 +93,'STP00A82','ActiveState Perl Dev DOR Modules 1.0',0,'Software','No +','Yes','No','Yes','No','No','No','No','No','No'],[34,'DOR00394','Act +iveState Perl Dev Kit 6.0 Pro Pack',0,'Software','No','No','No','Yes' +,'Yes','No','No','No','No','No'],[764,'','AD Group Request: Rev Repo +rts - Modify Access',1,'General','No','Yes','Yes','Yes','Yes','Yes',' +No','No','No','No'],[81,'STP0028A','Adesso Cyber Pad Software Suite 3 +.13',0,'Software','No','Yes','No','Yes','Yes','No','No','No','No','No +'],[371,'STP009FB','Adesso Cyberpad 3.14
In reply to Re: Basic regex to parse source code
by toolic
in thread Basic regex to parse source code
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |