[Solved] Regular Expressions:JavaScript

Once possible solution is the following: ” Hi @raju how do you do? “.replace(/\s+|[@\?]/g,’-‘) .replace(/–+/g,’-‘) .replace(/^[\s-]+|[\s-]+$/g,”) >> output: “Hi-raju-how-do-you-do” You can add any other ‘special’ chars to the [] in the first replace. 1 solved Regular Expressions:JavaScript

[Solved] Simple sharing text and number App(Client-side) over internet [closed]

There are multiple ways to approach this problem (REST, WebSocket, etc.) I recommend using sockets in this case but I’ll leave it up to you to read up on the pros/cons of different approaches. Socket.IO has a popular Android library for real-time bidirectional event-based communication between two nodes. At a high level, to use Socket.IO … Read more

[Solved] Simple sharing text and number App(Client-side) over internet [closed]

Introduction Sharing text and numbers over the internet can be a daunting task, especially when it comes to developing a client-side application. Fortunately, there are a few simple solutions that can help you quickly and easily share text and numbers over the internet. In this article, we will discuss how to create a simple sharing … Read more

[Solved] How to change form background color on focus loss when text is entered?

blur is what you are looking for. document.write(“<input type=”text”>”); var input = document.querySelector(‘input’); input.addEventListener(‘focus’,function(){ input.style.backgroundColor = “purple”; }) input.addEventListener(‘blur’,function(){ if(input.value != “”){ input.style.backgroundColor = “green”; } }) 0 solved How to change form background color on focus loss when text is entered?