Return true if a string begins with letters between a and f , either upper- or lowercase.
Return true if a string contains a number.
In the string My friend is Betsy Ann Savage , capture the first and last name and display them in reverse, as Savage, Betsy .
Replace Betsy with Elizabeth in the previous string.
In the string 123abcdefg584 , replace all the letters with XXX .
Prompt the user for a string of text, then print true if the string ends in three or more numbers .
Prompt the user for a string of text, then display the first three characters in the string.
Prompt the user for a string of text that includes letters and numbers, then print true if the string does not contain the number 4 or the letter a , or print false if not.
Prompt the user for his first and last name. Display true if the name starts with an uppercase letter followed by lowercase letters. The last name would be similar to the following: Jones, Smith, McFadden, O'Reilly , and Jones-Smith .
Validate an international phone number that is represented as follows :
011 49 762 899 20
Start with a one- or two-character code for a United Kingdom postal district, such as B for Birmingham or RH for Red Hill, followed by a one- or two-digit number to represent a sector within that district. For example, RH1 is Red Hill district, sector 1; CM23 is the Chelmsford district, sector 23; and B1 is Birmingham district, sector 1. Following the district and sector is a space, followed by a digit and two characters, such as 4GJ.
For example: CM23 2QP
CM = Chelmsford district
23 = sector 23
2QP = a particular road.
Create a regular expression to validate a UK postal code as described above.
Validate a credit card number using the Lunh formula.