I have a string, in which I want to make sure that every ‘_’ is followed by a capital letter.
(and I need to do it on one regex)
How can I do it?
_[A-Z] is good if it finds only one, but will still match if I have: foo_Bar_bad
I have a string, in which I want to make sure that every ‘_’
Share
Do it the other way around with something like:
This will match if the string contains
_followed by anything but a capital letter. If it matches, then the string is malformed according to your criteria.Sample in perl: