
Search In
Regex for mobile number validation with prefix of '+'
^[+][0-9]{12,13}$
Regex for mobile number validation with optional '+'
^[+]?[0-9]{10,13}$
Use in Code:-
Pattern.matches("^[+][0-9]{12,13}$",mobilenumber);
Happy Coding ;)
The syntax of the preg_match function is that:
preg_match (string pattern, string string [, array pattern_array],[, int $flags [, int $offset]]]);
In the above function first and second parameter are mandatory and the rest of the parameters are opt
Sort() function is used to sort array in ascending order.
Example:
<?php
$numbers = array(9, 6, 3, 22, 12);
sort($numbers);
$length = count($numbers);
for($x = 0; $x < $length; $x++) {
echo $numbers[$x];
ech
Ruby provides a number of enumerable methods that we can pass on collections or array for performing searching, sorting etc operations.
Here I will be discussing with all, any, none and find methods:
a) all?
In this every member of the collection
1> 'each' will loop through each element of the array and evaluate whatever is return inside the block, but it returns the original array without any change.
a = [5,10,15,20]
=> [5, 10, 15, 20]
a.each {|t| t+2}
=> [5, 10, 15, 20]
a.each
Hello all,
The below tutorial will help you in displaying SQL row data as a column wise with user specific column name.
here, I've a table with #Temp1 name that contains the following columns Id, ReferenceId and Total.
SQL Code:--
CREATE TABLE #T
In the previous tutorial of Java Interview Questions and Answers Part 1, I have explained some basic coding problems of Java.This part is in continuation with the previous Java Interview Questions and Answers tutorial. In this part of the tutorial we
In the previous part, Java Interview Questions and Answers Part I and Java Interview Coding problems for Freshers- Part II, we have explained some basic questions of Java. This part is in continuation with the previous Java Interview Questions and An
Hey there!
Form Validation is a very important aspect when it comes to filling forms. It helps us to identify if we are entering the correct information or not. This blog post will particularly deal with the form validation of date and time.
Jquery Form Validation in Asp.Net:
For form validation first we have to design a form in HTML.
Example:
<form id="form1" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>