regexprepfile

Performs regular expression replacement in a file or files

Ahora está siguiendo esta publicación

regexprepfile(filename,exp,repstr) performs a regular expression replacement using the pattern exp in the file filename with the string repstr. exp, repstr may also be cell arrays of strings of the same size, in which case the replacement is performed for each pair by performing a regexprep using corresponding elements of the inputs. Alternatively repstr may be a string and exp a cell array, in this case the single string repstr will replace all the patterns in exp.

-----

regexprepfile replaces the string by creating a temporary copy of the file in which the replace is to be performed, replacing it in this file, and copying the file back to the original location for safety.

---

Note regexprepfile requires 'samesize.m' my file exchange contribution here: http://www.mathworks.com/matlabcentral/fileexchange/36636-samesize

Citar como

Richard Crozier (2026). regexprepfile (https://la.mathworks.com/matlabcentral/fileexchange/43396-regexprepfile), MATLAB Central File Exchange. Recuperado .

Agradecimientos

Inspirado por: samesize

Inspiración para: refactor_fcn_name

Categorías

Más información sobre Characters and Strings en Help Center y MATLAB Answers.

Información general

Compatibilidad con la versión de MATLAB

  • Compatible con cualquier versión

Compatibilidad con las plataformas

  • Windows
  • macOS
  • Linux
Versión Publicado Notas de la versión Action
1.1.0.0

asthetic change to file description, no change to file

1.0.0.0