Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
The CASE DEFINITION for #EbolaVirusDisease can be found on our website.
Download and read for definitions of:
✅Suspected cases,
✅Probable case and
✅Laboratory confirmed cases of #EbolaVirusDisease
🔗https://ncdc.gov.ng/themes/common/docs/protocols/288_1630509239.pdf
The risk of importation of the #EbolaVirusDisease into Nigeria is HIGH.
Healthcare workers & the general public are urged to maintain a high index of suspicion.
📜Read our public health advisory for measures to prevent the importation of #EVD:
https://ncdc.gov.ng/news/423/public-health-advisory-following-declaration-of-ebola-virus-disease-outbreak-in-uganda
Based on available data, the overall risk of importation of the #EbolaVirusDisease and the impact on the health of Nigerians has been assessed as HIGH.
📜Read our public health advisory for measures to prevent the importation of #EVD:
https://ncdc.gov.ng/news/423/public-health-advisory-following-declaration-of-ebola-virus-disease-outbreak-in-uganda
#NCDCUpdate
We have published an #EbolaVirusDisease care kit for incoming travellers from a country with ongoing transmission of #Ebola.
The care kit includes guides to monitor your temperature and symptoms.
Download & share via
https://ncdc.gov.ng/themes/common/docs/protocols/300_1669297182.pdf
#StaySafeStayHealthy
Common Viral Haemorrhagic Fevers #VHFs include #LassaFever, #EbolaVirusDisease, #YellowFever, #DengueFever, #MarburgFever and #CrimeanCongoHaemorrhagicFever.
What are the #InfectionPreventionandControl practices that need to be in place in the management of VHFs?
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf