Click here to Skip to main content
15,112,866 members

Comments by Member 14978380 (Top 10 by date)

Member 14978380 29-Oct-20 7:21am View
   
Thank you so much for your help...
:)
Member 14978380 29-Oct-20 7:11am View
   
I have conditions like this, so how can I use your method : >

if ( jQuery("#txtFirstNo").val().match(/^\d{10}$/, '') || jQuery("#txtFirstNo").val().match(/^[JJD01|JJD00|JVGL]+\d{7}$/, ''))
{
arr.push("one");
}
if ( jQuery("#txtFirstNo").val().match(/^\d{10,39}$/, '') || jQuery("#txtFirstNo").val().match(/^[GM|LX|RX]+[0-9]{10,39}$/, '') )
{
arr.push("two");
}
Member 14978380 29-Oct-20 7:09am View
   
Deleted
if (jQuery("#txtFirstNo").val().match(/^\d{22}$/, '') || jQuery("#txtFirstNo").val().match(/^[A-Z]{2}[0-9]{9}(US)$/, '') ) {
arr.push("one") ;
}
if ( jQuery("#txtFirstNo").val().match(/^\d{10}$/, '') || jQuery("#txtFirstNo").val().match(/^[JJD01|JJD00|JVGL]+\d{7}$/, ''))
{
arr.push("two");
}
Member 14978380 29-Oct-20 7:08am View
   
Deleted
if (jQuery("#txtFirstNo").val().match(/^\d{22}$/, '') || jQuery("#txtFirstNo").val().match(/^[A-Z]{2}[0-9]{9}(US)$/, '') ) {
arr.push("USPS") ;
}
if ( jQuery("#txtFirstNo").val().match(/^\d{10}$/, '') || jQuery("#txtFirstNo").val().match(/^[JJD01|JJD00|JVGL]+\d{7}$/, ''))
{
arr.push("DHL Express")+"";
}
Member 14978380 29-Oct-20 6:58am View
   
I am new to the jQuery. So please can you give me an exmaple ?
Member 14978380 29-Oct-20 6:41am View
   
What if I use two if conditions ? Because in the code I have skipped the regex pattern
Member 14978380 29-Oct-20 6:32am View
   
I want output in
one
two

rather than
one,two
Member 14978380 29-Oct-20 6:22am View
   
But it doesn't come in the list format. So is there any other option ?
And I have used arr.join("\n") , but it doesn't affects the output.
Member 14978380 29-Oct-20 6:16am View
   
Can I get the output in list format without changing if format ?
Member 14978380 29-Oct-20 6:14am View
   
No, I have some more regex patterns that are to be used in if conditions, so I want that if both the condition gets true then the value should come in list format.