Regex: How do I match an empty string?

26 views (last 30 days)
Consider the following string:
a = '';
How can I match it using regexp?

Accepted Answer

Jan Siegmund
Jan Siegmund on 15 May 2020
Use
regexp(a,'^$','emptymatch')

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!