
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 445 Articles for Programming Scripts

632 Views
To perform multiline matching, use the M modifier available in JavaScript Regular Expression.ExampleYou can try to run the following code to perform multiline matching − JavaScript Regular Expression var myStr = "Welcoming!"; var reg = /^ing/m; var match = myStr.match(reg); document.write(match);

202 Views
To match any of the specified alternatives, follow the below-given pattern −(foo|bar|baz)ExampleYou can try to run the following code to find any alternative text − JavaScript Regular Expression var myStr = "one,one,one, two, three, four, four"; var reg = /(one|two|three)/g; var match = myStr.match(reg); document.write(match);

4K+ Views
In this tutorial, we will learn how to perform Case Insensitive matching with JavaScript RegExp. Regular expressions can be declared in two ways − Using regular expressions literal, which start and end with slashes, and the pattern is placed in between. Calling the RegExp object constructor, which takes the pattern and flags in the parameters to create a regular expression. Users can use the below syntax to create a regular expression. Syntax //Using a regular expression literal const regex = /tutorial/i //Using RegExp constructor const regex2 = new RegExp('tutorial', 'i') In the above syntax, the regular expressions ... Read More

770 Views
In this tutorial, we learn how to find the digits between brackets using JavaScript RegExp. The ASCII values for the digits (0-9) start from 48 to 57. We denote the digits in the bracket as [0-9] in the regular expression. To find the digits in a range except for all digits, we can write the particular range. As to find the digits between 4 and 8, we could write it as [4-8] in the regular expression pattern. Now, our aim is to find digits inside the brackets in the text using RegExp in JavaScript. We could follow the below syntaxes ... Read More

6K+ Views
To delete rows in a table in JavaScript, use the DOM deleteRow() method.ExampleYou can try to run the following code to learn how to delete rows in a table. The code deletes rows one at a time −Live Demo function captionFunc(x) { document.getElementById(x).createCaption().innerHTML = "Demo Caption"; } One Two Three Four Five Six

9K+ Views
This tutorial will teach us to show image rollover with a mouse event in JavaScript. The meaning of the image rollover is to either change the image style or the whole image when the user rollovers the mouse on the image.To build an attractive user interface, developers often add image rollover features to the website and applications. Here, we will see to apply image rollover differently.Change the style of the image on mouse rolloverIn this method, to create the image rollover, we will use the onmouseover and onmouseout event of JavaScript. When users take the mouse pointer on the image, ... Read More

516 Views
To create a table caption, use the DOM createCaption() method.ExampleYou can try to run the following code to learn how to create table caption −Live Demo function captionFunc(x) { document.getElementById(x).createCaption().innerHTML = "Demo Caption"; } One Two Three Four Five Six

274 Views
In this tutorial, we will learn to simplify the use of regular expressions in JavaScript. Some of you have heard the regular expression word for the first time. So, it is not related to JavaScript but can be used in any programming language.The simple definition of the regular expression is that it is a sequence of the characters, also called Regex or RegExp. It can be a small or complex sequence.Let’s understand the need for regular expression by the example in the below section.Why should we use regular expressions?Suppose that you are developing the application and you need to take ... Read More

8K+ Views
In this tutorial, we will learn how to get the innerHTML of a cell with JavaScript DOM. Use the innerHTML property in JavaScript to get the innerHTML of a cell. We can manipulate the DOM (Document Object Model) easily using document.getElementById(). It is a method that returns the element object that represents the id of the element whose id is mentioned in the method’s parameter. Since every tag’s id is unique, we can easily access the element by its id. Then the innerHTML property will help to access the text or content of that tag Using Table cells Collection To ... Read More

133 Views
This IE4 document object model (DOM) introduced in Version 4 of Microsoft's Internet Explorer browser. IE 5 and later versions include support for most basic W3C DOM features.ExampleTo access document properties using IE4 DOM method, try to run the following code − Document Title This is main title Click the following to see the result: