Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

3.4.2. Two Special Characters¶

console.log("Some Programming Languages:");

console.log("Python
JavaScript
Java
C#
Swift");

/*For the computer, newline is an invisible character that is used
to tell the machine to move to the next line. It is possible to use this
invisible character with the special representation 
.
In addition to the newline character, there is also a special tab 
character, 	. Go back to the eight examples above and experiment 
with using 	 and 
./*
Comment

3.4.2. Two Special Characters¶


import re
def checkvalid(string1):
    if re.search(r'[d.]s+[d.]', string1): return False # two numbers separated by spaces
    string1 = string1.replace(' ', '')
    return (bool(re.search(r'd', string1))               # must contain numbers
        and not re.search(r'.d*.', string1)            # a number can't contain two dots
        and not re.search(r'[$^]{2}|#[$^]|[$^]#[$^#]', string1) # obviously
        and not re.search(r'^[$^]|[$^]$', string1)        # special at the beginning or end
        and not re.search(r'^##|##$', string1)            # two hashes at the beginning or end
    )

Comment

PREVIOUS NEXT
Code Example
Javascript :: 4.3.1. Declaring and Initializing Variables With let¶ 
Javascript :: 4.6.1. Operators and Operands¶ 
Javascript :: 5.1.1. Boolean Values¶ 
Javascript :: react userefrence example 
Javascript :: jquerry shorthand for fetch 
Javascript :: encryption decryption in javascript 
Javascript :: how to share variables between routes node 
Javascript :: node --trace-deprecation in webpack 
Javascript :: distructuring null check 
Javascript :: elasticsearch performance 
Javascript :: callbacks 
Javascript :: song discord.js 
Javascript :: device nature javascript 
Javascript :: movie-trailer usage 
Javascript :: javascript show popup on page refresh unsaved changes 
Javascript :: import image in react js 
Javascript :: regular expression 010+100 answer 
Javascript :: c# summary brackets 
Javascript :: Unexpected eval or arguments in strict mode 
Javascript :: get user input javascript 
Javascript :: convert javascript to java regex 
Javascript :: react get dynamic window sizes 
Javascript :: override print command javascript 
Javascript :: suisie with c 
Javascript :: cors error in post request resolved 
Javascript :: Error: ENOENT: no such file or directory, scandir 
Javascript :: angular validar formulario 
Javascript :: node equivalent of bash exec 
Javascript :: scale sprite matter.js 
Javascript :: node spawn bash catch errors 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =