Sharing the document and the code is probably helpful in finding a solution. I personally don't recognize what you are referring to, but if you post the file and the code I can help you experiment. (note that you need to zip some file types in order to be allowed to upload them)
How does Requirements Toolbox parse requirements for Microsoft Word files?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Does requirements toolbox parse each paragraph and look for the given regular expression? I am trying to parse a requirements document, but paragraphs with two requirements in them are not parsed separately. Do I need to manually separate them in the document?
3 comentarios
Pat Canny
el 9 de Jun. de 2025
Just so I understand, do you have multiple requirements under the same heading which are separable based on a regular expression?
Reference here for @Rik: https://www.mathworks.com/help/slrequirements/ug/import-requirements-from-microsoft-office.html <-- I assume @Jim is using the "Identify items by occurrences of search pattern (REGEXP)" option.
Thanks.
Respuestas (1)
Govind KM
el 22 de Jul. de 2025
I was able to reproduce this observation in R2025a, where multiple requirements in one paragraph are not parsed separately when the "Identify items by occurrences of search pattern (REGEXP)" option is used. One paragraph is treated as one requirement, even if there are multiple matches of the regular expression.
As a workaround, the "PostImportFcn" callback can be used to execute code that modifies the requirements after the import completes. You can specify code in the callback to split such requirements into two or more separate ones as needed.
Additionally, the option to define a custom document interface for importing requirements has been introduced in R2023a. You can implement your own importer interface, for document types that are not supported, or can extend one of the built-in interfaces, as would be appropriate in this case (i.e. implementing a custom variant of the Microsoft Word Importer).
Kindly refer to the following documentation links for more information:
- Using callbacks to customize requirements import behavior: https://www.mathworks.com/help/releases/R2022b/slrequirements/ug/customize-requirement-import-behavior-by-using-callbacks.html
- Example of "PostImportFcn" callback usage: https://www.mathworks.com/help/releases/R2022b/slrequirements/ug/import-requirements-from-microsoft-excel.html
- Define custom document interface for importing requirements (Since R2023a): https://www.mathworks.com/help/slrequirements/ug/define-custom-document-types-for-importing-requirements.html#mw_81010553-1063-45f8-b6b9-77217d74833e
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Author Requirements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!