[D] Add a try-catch to handle wrong regex
[D] Test regex use
[D] Update demo