Regular expression to split a long string



Please help if you can.

I have a web form that has a multiline input box 30 columns by 15 rows. The
maximum length of a user's entry can be 450 characters. I need to read this
data into a series of 15 database fields (each 30 characters wide). I know
this amounts to poor normalization, btu the system is old and cannot be
maintained under the current project.

I need to accept the user's entry in this textbox and split it into (up to)
15 strings, no wider than 30 characters each. Ideally, splits will occur
where newline characters occur or after each 30th character. I have
experimented with many different regular expressions similar to

"((?m:(.{1,30})\n?){1,15})"

but I can't get the separate strings.

Has anyone tried something like this successfully?



.



Relevant Pages

  • Marvel Encyclopedia
    ... Encyclopedia," a guide to the characters of the Marvel Comics ... Each entry is headed ... "Warlock" - the genetically engineered cosmic hero ADAM Warlock, ...
    (rec.arts.comics.marvel.universe)
  • Re: add multiple words to custom dictionary Microsoft Word
    ... >> capital letters in the entry, the entry will match only text words ... >> Avoid any characters not in the code page 1252. ... >> Sorting is not required and duplicate entries do not hurt; ...
    (microsoft.public.word.newusers)
  • Re: Bug in HPTools?
    ... a clean environment (the file 'mass' in the eqstk package was not ... characters, with the first 12 matching a valid entry. ... tools sasm seems to handle this by simply truncating the name down to ...
    (comp.sys.hp48)
  • Re: Regular expression to split a long string
    ... > I have a web form that has a multiline input box 30 columns by 15 rows. ... > maximum length of a user's entry can be 450 characters. ... > but I can't get the separate strings. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Drop down list width
    ... Assuming you're speaking of the dropdown available from the Forms ... If you use the ComboBox from the Control Toolbox toolbar, ... if an entry is longer than will fit on ... the Gettysburg Address (176 characters). ...
    (microsoft.public.word.docmanagement)