This works well, but I would also like to split if \n exists in the string. Basically, I want to split on \n and still provide a maximum length per string in the array. What is the simplest way to do this?@invoice_note_lines = $invoice_data_ref->{'invoice_note'} =~ /(.{1,$in +voice_note_line_length}\W)/gms;
In reply to Split string using regex on \n or max line length by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |