Regular expressions
(Created page with "In OCL a regular expression match could be performed using regExpMatch, which will return true/false. Following example shows one way to decide if a string is a valid email a...")
(No difference)

Revision as of 13:39, 3 February 2022

In OCL a regular expression match could be performed using regExpMatch, which will return true/false.

Following example shows one way to decide if a string is a valid email adress, or not.

'åke.öberg@mdriven.se'.regExpMatch('^[a-öA-Ö0-9+_.-]+@[a-öA-Ö0-9.-]+\.[a-zA-Z]{2,3}$')

This page was edited 97 days ago on 02/10/2024. What links here