A developer is building a robot to validate that the birth date is in the correct format within the submitted forms. Which method or activity is best-suited to validate the format?
The Is Match activity is used to check if a string matches a given regular expression pattern. The regular expression pattern can be used to validate the format of a string, such as a date. In this case, the developer wants to validate that the birth date is in the correct format, which is dd-MM-yyyy. The regular expression pattern for this format is “\d{2}-\d{2}-\d{4}”, which means two digits, followed by a hyphen, followed by two digits, followed by a hyphen, followed by four digits. The Is Match activity will return True if the input string matches this pattern, and False otherwise. Therefore, the answer is D. Activity. Is Match. References: Is Match, Regular Expressions
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit