Javascript
Assign re with a regular expression that contains an upper-case letter (A-Z) followed by a dash.
Solution for the given question are as follows -
Code :
<!DOCTYPE html>
<html>
<body>
<input type="text" id="input" name="input" placeholder="enter
any text"/>
<button onclick="checkRegex()">Check
Regex</button>
<p id="regex"></p>
<script>
function checkRegex() {
var input = document.getElementById("input").value;
if (input.match(/^[A-Z\-]*$/)) {
document.getElementById("regex").innerHTML =
"Valid Input";
} else {
document.getElementById("regex").innerHTML =
"Invalid Input";
}
}
</script>
</body>
</html>
Code Screen Shot :

Output :
1)

2)

Javascript Assign re with a regular expression that contains an upper-case letter (A-Z) followed by a...
A JavaScript identifier is defined as follows: It starts with a letter, the underscore ( _ ), or the $ sign, and is followed by any combination of letters, digits, the uderscore ( _ ), and the $ sign. Write a regular expression to check if a given string is a valid Javascript identifier as defined above.
For this discussion, you will be working with regular expressions. Please create a regular expression that requires passwords to begin with an uppercase letter, followed by five lowercase letters, followed by a one-digit number (0-9), and ending with one symbol (@, $, %, or &). You may use the index.htm file included with this discussion to test your regular expression. Note that the index.htm file contains HTML and JavaScript. To test your regular expression, simply assign your regular expression to...
LINUX ubuntu please. Please show the result's screenshot. Thanks in advanced. Using the regular expression rules create grep commands that locate the following lines in /etc/services: All lines that contain the string smtp. All lines that begin with the string smtp. All lines that include periods (dots, .) All lines that include the string ftp except when that string is followed immediately by a dash (-). All lines in which the letter a follows the letter z. All lines that...
A
person's initials consist of the first letter (in upper case) of
each of their names. For example, the initials of Alan Mathison
Turing are AMT.
Use loops to print out all possible initials for people who
have exactly three names. Cycle through the letters of the first
initial first, followed by the middle initial, and then the last
initial.
Python Programming
A person's initials consist of the first letter (in upper case) of each of their names. For example,...
Write a program to read a letter in lower case the convert this letter to upper case and print it. (to convert from lower to upper subtract from the value 20h)
Regular expression to DFA Regular expression: [AZ]3*((4?q+)|(6*y))?z+ DFA: ????
password has to be exactly 8 characters long. Must use: upper case letters- A, B, C,D...Z and lower case letters- a, b,c, d ..., z and digits- 0, 1,2, ..., 9 If A is the set of passwords with NO upper case letter and B is the set of passwords with NO lower case letter, then what is the size of |A ∪ B|?
Write a new subroutine in assembly to convert the upper-case letters to lower-case letter. Example of lower case to upper is provided below: Let’s look at a subroutine to capitalize all the lower-case letters in the string. We need to load each character, check to see if it is a letter, and if so, capitalize it. Each character in the string is represented with its ASCII code. For example, ‘A’ is represented with a 65 (0x41), ‘B’ with 66 (0x42),...
1. Given any word x (e.g. 'sTrInG'), how to make only the first letter upper case, and all other letter lower case? Given a list of words such as list_word = ['MS-Word','MS-Excel','Target','Walmart'……], please write a one line command to extract a sublist that only contains the items starting with 'MS'
Assume passwords are 10 characters long, and each character is either a lower case letter, upper case letter, or digit 0, . . . , 9. (a) How many possible passwords are there? (b) How many passwords are there with at least one upper case letter, and also never repeat a character? (c) How many passwords are the same written forwards and backwards?