Hi
Here is the first half of the text file, anything after this I can remove by using str_replace.
[Assistance]
EventTriggersFileCount=1
EventTriggersFile.0=EventTriggers
[Main]
Title=Birmingham to Princess Juliana Intl
Description=Birmingham to Princess Juliana Intl
AppVersion=10.0.61355
FlightVersion=1
MissionType=FreeFlight
MissionLocation=Birmingham
OriginalFlight=
FlightType=NORMAL
StartingCameraCategory=Custom
[Options]
Sound=True
Moonlight=True
Save=False
SaveOriginalFlightPlan=False
TextDisplayPage=0
SlewDisplayPage=1
AxisIndicator=Off
[Sim.0]
Sim=Airbus A320 Neo Asobo
Pilot=Pilot_Female_Uniform
Copilot=Pilot_Female_Uniform
TailNumber=1234
AirlineCallSign=CLEGG01
FlightNumber=12FG
AppendHeavy=False
[ResourcePath]
Path=Missions\Asobo\FreeFlights\FreeFlight\FreeFlight
[ObjectFile]
File=Missions\Asobo\FreeFlights\FreeFlight\FreeFlight
[Atc_Menu]
Visible=True
[FreeFlight]
FirstFlightState=PREFLIGHT_GATE
[Weather]
UseWeatherFile=False
UseLiveWeather=True
WeatherPresetFile=
WeatherCanBeLive=True
CloudmapPosOverride=False
CloudmapInitialPosX=0
CloudmapInitialPosY=0
FixedClouds=False
DebugPublicAirflowDisplay=False
[Departure]
ICAO=EGBB
GateName=PARKING
GateNumber=23
GateSuffix=NONE
[Arrival]
ICAO=TNCM
RunwayNumber=10
RunwayDesignator=NONE
[Loading]
ImageName0=LOADING_FREEFLIGHT
Tips0=asobo-aircraft-a320-neo,TT:LOADING.TIPS.A320NEO_001,TipCategory_Aircraft
Tips1=asobo-aircraft-a320-neo,TT:LOADING.TIPS.A320NEO_001,TipCategory_Aircraft
Tips2=asobo-aircraft-a320-neo,TT:LOADING.TIPS.A320NEO_002,TipCategory_Aircraft
Tips3=asobo-aircraft-a320-neo,TT:LOADING.TIPS.A320NEO_002,TipCategory_Aircraft
[TrafficOptions]
[Panels]
Panel.On=True
HUD.On=False
[Window.1]
Order=255
Active=True
Undocked=False
Maximized=False
ScreenUniCoords=0, 0, 8192, 2800
UndocCoords=0, 0, 0, 0
[ATC_AgentManager]
NumberofAgents=0
[ATC_Aircraft.0]
ActiveFlightPlan=True
RequestedFlightPlan=True
AcState=ACSTATE_REQUEST_TAXI_CLEARANCE_OUT_VFR_ATIS
Waypoint.0=, EGBB, , EGBB, A, N52� 27.23', W1� 44.88', +000315.50, , , , , , NONE, 0, 0, -1, 0, 0,
Waypoint.1=, , , TIMECLIMB, U, N52� 25.32', W1� 42.75', +000915.50, , , , , , NONE, 0, 0, -1, 0, 0,
Waypoint.2=, , , TIMECRUIS, U, N42� 45.71', W33� 37.27', +036500.00, , , , , , NONE, 0, 0, -1, 0, 0,
Waypoint.3=, , , TIMEDSCNT, U, N35� 20.99', W45� 15.71', +036500.00, , , , , , NONE, 0, 0, -1, 0, 0,
Waypoint.4=, , , TIMEAPPROACH, U, N18� 0.89', W63� 17.52', +002050.00, , , , , , NONE, 0, 0, -1, 0, 0,
Waypoint.5=, TNCM, , TNCM, A, N18� 2.51', W63� 6.79', +000007.21, , , , , , NONE, 0, 0, -1, 0, 0,
NumberofWaypoints=6
ClearanceFlags=882
CtCur=CLEARANCE_NONE
WaypointNext=2
AltCleared=-1
HdgAssigned=-1
SquawkAssigned=4608
LandingSequence=LANDING_NONE
DepartureRequest=DEPARTURE_VFR_REQUEST_NONE
ParkingRequest=PARKING_NAME_NONE
ParkingTypeRequest=PARKING_TYPE_NONE
PatternLeg=PATTERN_LEG_NONE
ApproachIndex=-1
ApproachTransitionIndex=-1
ApproachRequestIndex=-1
ApproachTransitionRequestIndex=-1
RunwayIndex=-1
RunwayRequestIndex=-1
ParkingIndex=-1
FlightFollowing=FLIGHT_FOLLOWING_NO
AirspaceTransition=AIRSPACE_TRANSITION_NONE
BVAirspaceTransition=BV_TYPE_NONE
BVAirspaceTransitionReq=BV_TYPE_NONE
TakeoffSequence=TAKEOFF_SEQUENCE_NONE
LandingSequenceNumber=-1
TaxiRouteCurrent=-1
CruisingAltitude=36500
RequestedCruisingAltitude=-1
ExpectedAltitude=-1
AircraftSignature=1,0
[ATC_ActiveFlightPlan.0]
title=Birmingham to Princess Juliana Intl
description=Birmingham to Princess Juliana Intl
type=VFR
routetype=0
cruising_altitude=36500
departure_id=EGBB, N52� 27.23', W1� 44.88', +000315.50
departure_position=PARKING 23 PARKING NONE
destination_id=TNCM, N18� 2.51', W63� 6.79', +000007.21
departure_name=Birmingham
destination_name=Princess Juliana Intl
waypoint.0=, EGBB, , EGBB, A, N52� 27.23', W1� 44.88', +000315.50, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.1=, , , TIMECLIMB, U, N52� 25.32', W1� 42.75', +000915.50, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.2=, , , TIMECRUIS, U, N42� 45.71', W33� 37.27', +036500.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.3=, , , TIMEDSCNT, U, N35� 20.99', W45� 15.71', +036500.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.4=, , , TIMEAPPROACH, U, N18� 0.89', W63� 17.52', +002050.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.5=, TNCM, , TNCM, A, N18� 2.51', W63� 6.79', +000007.21, , , , , , NONE, 0, 0, -1, 0, 0,
[ATC_RequestedFlightPlan.0]
title=Birmingham to Princess Juliana Intl
description=Birmingham to Princess Juliana Intl
type=IFR
routetype=3
cruising_altitude=38000
departure_id=EGBB, N52� 27.23', W1� 44.88', +000315.50
departure_position=PARKING 23 PARKING NONE
destination_id=TNCM, N18� 2.51', W63� 6.79', +000007.21
departure_name=Birmingham
destination_name=Princess Juliana Intl
waypoint.0=, EGBB, , EGBB, A, N52� 27.23', W1� 44.88', +000315.50, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.1=EG, 2IBIR, EGBB, 2IBIR, I, N52� 25.13', W1� 42.60', +000800.00, , LUXT15, , , 15, NONE, 0, 0, -1, 0, 0,
waypoint.2=EG, 4IBIR, EGBB, 4IBIR, I, N52� 23.15', W1� 41.66', +001200.00, , LUXT15, , , 15, NONE, 0, 0, -1, 0, 0,
waypoint.3=EG, LUXTO, , LUXTO, I, N52� 8.51', W2� 3.64', +005150.00, , LUXT15, , , 15, NONE, 0, 0, -1, 6000, 0, A
waypoint.4=EI, LUVIS, , LUVIS, I, N51� 23.40', W9� 28.52', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.5=EG, H4916, , H4916, I, N49� 30.00', W16� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.6=EG, H4722, , H4722, I, N47� 30.00', W22� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.7=EG, H4528, , H4528, I, N45� 30.00', W28� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.8=LP, H4333, , H4333, I, N43� 30.00', W33� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.9=, , , TIMECRUIS, U, N42� 50.86', W33� 55.15', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.10=LP, H4037, , H4037, I, N40� 30.00', W37� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.11=KZ, H3841, , H3841, I, N38� 30.00', W41� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.12=KZ, 3645N, , 3645N, I, N36� 0.00', W45� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.13=, , , TIMEDSCNT, U, N35� 25.03', W45� 43.44', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.14=KZ, H3348, , H3348, I, N33� 30.00', W48� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.15=KZ, H3052, , H3052, I, N30� 30.00', W52� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.16=KZ, H2755, , H2755, I, N27� 30.00', W55� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.17=KZ, H2458, , H2458, I, N24� 30.00', W58� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.18=KZ, H2161, , H2161, I, N21� 30.00', W61� 0.00', +038000.00, , , , , , NONE, 0, 0, -1, 0, 0,
waypoint.19=, 0008, , AFirst, U, N18� 14.61', W63� 23.30', +005000.00, , , ULUBA1, , 10, NONE, 0, 0, -1, 0, 0,
waypoint.20=TN, ULUBA, TNCM, ULUBA, I, N18� 0.89', W63� 17.49', +002050.00, , , ULUBA1, , 10, NONE, 0, 0, -1, 0, 0,
waypoint.21=, TNCM, , TNCM, A, N18� 2.51', W63� 6.79', +000000.00, , , , , , NONE, 0, 0, -1, 0, 0,
[ATC_AircraftManager]
NumberofAircraft=1
[ATC_MessageSystem]
FrequencyNodes=0
As you can see the away points are repeated a few times within a block of text, so, I would like to remove the unwanted blocks of text.
When I create a new flight plan the information within the blocks can be more or less information.
many thanks for your fast reply
Cheers
Cleggie