Prevent MS office documents from uploading

hello there, would somebody help on how to prevent MS office documents (docx etc.,) from uploading; how to compose the regex statement?

Many thanks in advance

Please read Files access control . After install the app File access control you can test this regular expression:

Example in the documentation:
/^application/(zip|x-zip-compressed)$/i

Perhaps (not tested):

/^application\/vnd\.openxmlformats-officedocument\.wordprocessingml\.document$/i

Read excel - What is a correct mime type for docx, pptx etc? - Stack Overflow or Common MIME types - HTTP | MDN

devnull, the solution you proposed works, however, it doesn’t work if I create give more than one rules, is it normal. Please note I am very new to nextcloud. What I am trying to do is to limit only commonly used graphics images, and pdf documents to be allowed to upload.

Sorry i do not use it. But perhaps you must change the logic. Perhaps the rules A and B users the operator AND. Then “name.docx” does not match e.g. “.docx” AND “.xlsx”. Can you change the logic of the regular expressions from AND to OR or OR to AND?

/^application/vnd.openxmlformats-officedocument.wordprocessingml.document$|(zip|x-zip-compressed)$/i

devnull the combined regexp statement above seems to be working; thanks for your direction.