2 Replies Latest reply on Mar 17, 2014 1:22 PM by IT_User

    Split/Parse a Text/String field to records

    IT_User

      Hello

       

      I have a text field that has the format:

      Date Notes

      Date Notes

      Date Notes

       

      I need to take out each section starting with a date and put it in a new record. (There are usually more than 3 lines, but not a set amount.)

       

      However, it gets more complicated because it can also have the format

      Date Notes

      Date Notes, the start of it

      and continues on it

      Date Note, more notes, date, some more notes

       

      Which would need to be put in records as

      Record 1:

      Date Notes

      Record 2:

      Date Notes, the start of it

      and continues on it

      Record 3:

      Date Note, more notes, date, some more notes

       

      I have an idea of looking for the pattern "¶date" and whatever is after until the next "¶date" (except for the first line where I'll jut put in a record automatically).

      Also, the dates could be the formats M/D/YY, M/D/YYYY, M/DD/YY, M/DD/YYYY, MM/D/YY, MM/D/YYYY, MM/DD/YY, MM/DD/YYYY.

       

      I can think of how to do this with regular expressions, but not in FileMaker.

       

      Any help is appreciated.

      Thank you!

       

      P. S. I can figure out the script to get each section of notes into a record once I get a value list/array of some sort.