How can I format a markdown text received from an API response?

While fetching data from an API, I received this text:

## Community Coordinated Modeling Center Database Of Notifications, Knowledge, Information (CCMC DONKI) ## Message Type: Weekly Space Weather Summary Report for September 27, 2023 - October 03, 2023 ## ## Message Issue Date: 2023-10-04T19:26:59Z ## Report Coverage Begin Date: 2023-09-27T00:00Z ## Report Coverage End Date: 2023-10-03T23:59Z ## Message ID: 20231004-7D-001 ## ## Disclaimer: NOAA's Space Weather Prediction Center is the United States Government official source for space weather forecasts. This "Experimental Research Information" consists of preliminary NASA research products and should be interpreted and used accordingly. ## Summary: Solar activity varied from minor to moderate levels during this reporting period with 5 M-class flares and 3 C-type CMEs (see details below). Based on preliminary analysis by the Moon to Mars Space Weather Analysis Office and heliospheric modeling carried out at NASA Community Coordinated Modeling Center, it was estimated that the following CME would impact non-Earth locations: CME Starting time | Predicted Location/Mission Impacts (plus minus 7 hours) ----------------------------------------------------------------------------- 2023-10-03T12:48Z Mars at 2023-10-08T21:37Z, Solar Orbiter at 2023-10-04T06:29Z and Lucy at 2023-10-12T00:00Z (glancing blow) Geomagnetic activity was at below minor levels with Kp index (a measure of geomagnetic activity, ranging 0-9) <=4 for the reporting period. The > 2.0 MeV energetic electron flux in the Earth's outer radiation belt crossed the threshold of 1000 pfu starting at 2023-09-27T12:00Z and remained elevated through 2023-09-30 (see notifications 20230927-AL-001, 20230927-AL-002, and 20230929-AL-001). Towards the end of the reporting period, the > 2.0 MeV energetic electron flux crossed the 1000 pfu threshold again at 2023-10-03T14:05Z (see notifications 20231003-AL-001 and 20231003-AL-002). These elevated energetic electron flux levels are likely associated with the arrival of O-type CMEs first seen during the previous reporting period on 2023-09-22 and the possible arrival of a coronal hole high speed stream at L1 on 2023-09-27. The energetic proton flux of >10 MeV protons detected at GOES and the 13-100 MeV protons at STEREO A were all at background levels for the entire reporting period. Space Weather Impact: Space weather impacts on NASA spacecraft are expected to have been low to moderate this week due to the elevated energetic electron flux in the Earth's outer radiation belt described above. ##Events: Flares (M-class and above) Date Start Stop Peak Class Location 2023-09-28 08:58:00 09:11:00 09:07:00 M1.2 S18E63 ( 13450 ) 2023-09-30 16:16:00 16:49:00 16:32:00 M1.2 N11E65 ( 13451 ) 2023-10-01 01:10:00 01:43:00 01:32:00 M2.5 N12E58 ( 13452 ) 2023-10-01 01:44:00 01:49:00 01:46:00 M1.6 N15E59 ( 13451 ) 2023-10-02 12:35:00 12:58:00 12:46:00 M1.9 N19E68 ( 13455 ) CMEs (>500 km/s): Earth directed: Starting time Speed (km/s) Type Direction (LON/LAT in HEEQ) Half-Angle width (degrees) Detecting spacecraft (real-time) None Observed Non-Earth directed: Starting time Speed (km/s) Type Direction (LON/LAT in HEEQ) Half-Angle width (degrees) Detecting spacecraft (real-time) 2023-09-28T00:24Z ~507 C -70/-17 14 SOHO, STEREO A 2023-10-02T13:12Z ~543 C NONE(POS)/8 10 SOHO, STEREO A 2023-10-03T12:48Z ~632 C -130/9 42 SOHO, STEREO A ## Space Weather Outlook: ## Outlook Coverage Begin Date: 2023-10-04T00:00Z ## Outlook Coverage End Date: 2023-10-10T23:59Z Solar activity is expected to vary between low and moderate levels during the outlook period. There are currently nine numbered Active Regions on the Earth-facing disk. Active Region 13451 (currently located at N16E13) and Active Region 13452 (currently located at N11E10) produced a few M-class flares during the reporting period and may exhibit continued flaring activity. As seen in the available EUV imagery from SDO, there is currently at least one unnumbered Active Region visible near the eastern limb around latitude S10 and perhaps another around latitude N30 which may also exhibit flaring activity during the outlook period. Additionally, a large filament structure spanning from S10W10 to N40E40 (as seen in SDO EUV imagery) could lift off the Earth-facing disk producing an associated CME during the outlook period. Geomagnetic activity is expected to vary between low and minor levels during the outlook period. A couple of coronal hole structures currently visible in SDO EUV imagery centered around S20E25 and S30E40 may develop further and become geoeffective towards the end of the outlook period. ## Notes: SCORE CME typification system: S-type: CMEs with speeds less than 500 km/s C-type: Common 500-999 km/s O-type: Occasional 1000-1999 km/s R-type: Rare 2000-2999 km/s ER-type: Extremely Rare >3000 km/s

Just like that, without spaces… how can I format this response?

If someone can help, it would be great!

Thanks

you can try “spiltting” it with “##”, which will give you an array of tokens and then you can either pick and choose or recreate your string as you please

happy coding :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.