File size: 414 Bytes
2d00e5a
 
2b98370
2d00e5a
2b98370
2d00e5a
 
 
 
2b98370
 
2d00e5a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def get_section_from_report(report: str, section: str):
    section_lower = section.lower()
    findings_start_idx = report.lower().find(f"{section_lower}:")

    if findings_start_idx > -1:
        findings_start_idx = report.lower().find(f"{section_lower}:") + len(
            f"{section_lower}:"
        )
        findings = report[findings_start_idx:]
    else:
        findings = report

    return findings