Jump to content

Cutting portions of a string


Nerox.

Recommended Posts

I have a normal .txt file, that file includes a lot of info in that format

[[Event name: Blbabalba]

[Event date: mm/dd/yy]

[Event Desc: blalbal]

1. blablalbalblabla (blabalbal)....

......5.bblablablal

]

[Event name: blalblalba2]

[Event date: mm/dd/yy 2]

........etc, you get the idea

There is more than 300 of these portions and they are all after each other, I know I can use string.sub to cut the string but how to identify where to start from and where to end, I want to process this automatically so the scripts get every event part and store this string in a table.

see these 2 [ ] ? these aren't in the string I just put them so you understand that what's inside of them is the part which should be cut for each event part

How to do this,

and Thanks in advance

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...