Regex: How do I match an empty string?

37 次查看(过去 30 天)
Consider the following string:
a = '';
How can I match it using regexp?

采纳的回答

Jan Siegmund
Jan Siegmund 2020-5-15
Use
regexp(a,'^$','emptymatch')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by