Click here to watch on Youtube :
https://www.youtube.com/watch?v=A2Vm-hS51u8&list=UUhwKlOVR041tngjerWxVccw
RegexDemo.java
Output
Click the below link to download the code:
https://sites.google.com/site/ramj2eev1/home/javabasics/RegexDemo_SSN.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/RegexDemo_SSN
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/576579fab6c376d5ecd7cb5b7402b7fd1a7c4ae3/BasicJava/RegexDemo_SSN/?at=master
See also:
All JavaEE Videos Playlist 
All JavaEE Videos 
All JAVA EE Links 
Servlets Tutorial 
All Design Patterns Links 
JDBC Tutorial 
Java Collection Framework Tutorial 
JAVA Tutorial 
Kids Tutorial 
https://www.youtube.com/watch?v=A2Vm-hS51u8&list=UUhwKlOVR041tngjerWxVccw
RegexDemo.java
import java.util.ArrayList;
import java.util.List;
/**
*
* A Social Security Number (SSN) consists of nine digits, commonly written as
* three fields separated by hyphens: AAA-GG-SSSS.
*
* The first three-digit field is called the "area number".
* The central, two-digit field is called the group number".
* The final, four-digit field is called the "serial number"
*
*/
public class RegexDemo
{
public static void main(String[] args)
{
List<String> ssnList = new ArrayList<String>();
ssnList.add("123-45-6789");
ssnList.add("9876-5-4321");
ssnList.add("987-65-4321 (G)");
ssnList.add("987-65-4321");
ssnList.add("192-83-7465");
String ssnRegex = "^(\\d{3}-\\d{2}-\\d{4})";
      
for (String ssn : ssnList)
{
if (ssn.matches(ssnRegex))
{
System.out.println("Found good SSN: " + ssn);
}
}
}
}
import java.util.List;
/**
*
* A Social Security Number (SSN) consists of nine digits, commonly written as
* three fields separated by hyphens: AAA-GG-SSSS.
*
* The first three-digit field is called the "area number".
* The central, two-digit field is called the group number".
* The final, four-digit field is called the "serial number"
*
*/
public class RegexDemo
{
public static void main(String[] args)
{
List<String> ssnList = new ArrayList<String>();
ssnList.add("123-45-6789");
ssnList.add("9876-5-4321");
ssnList.add("987-65-4321 (G)");
ssnList.add("987-65-4321");
ssnList.add("192-83-7465");
String ssnRegex = "^(\\d{3}-\\d{2}-\\d{4})";
for (String ssn : ssnList)
{
if (ssn.matches(ssnRegex))
{
System.out.println("Found good SSN: " + ssn);
}
}
}
}
Output
Found good SSN: 123-45-6789
Found good SSN: 987-65-4321
Found good SSN: 192-83-7465
Found good SSN: 987-65-4321
Found good SSN: 192-83-7465
Click the below link to download the code:
https://sites.google.com/site/ramj2eev1/home/javabasics/RegexDemo_SSN.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/RegexDemo_SSN
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/576579fab6c376d5ecd7cb5b7402b7fd1a7c4ae3/BasicJava/RegexDemo_SSN/?at=master
See also:
 


 
Buy Clone Cards
ReplyDeleteBuy Dumps with Pin Fullz
Buy Ledger Nano X
Buy Qicarwow USB Magnetic Card Reader
Buy Universal Deep Insert ATM Skimmer
Hack Social Media Accounts
Remove Criminal Records From Database
Buy Fake Bills Online
Buy ID Cards Online
Buy Drivers License Online
Buy Social Security Number (SSN)
Change Examination Results
File Tax Returns Online
Buy IELTS Certificate
High Balance Clone Cards for sale
Cheap Clone Cards for sale
atm skimmer for sale
ReplyDeletessn for sale online
pay to change examination results
how to buy drivers license
atm skimmer device for sale
buy ielts certificate without exam
buy drivers license online
order cloned cards
buy drivers license
quality counterfeit bills for sale
cheap ATM Skimmer for sale
Social Media hacking
Remove Criminal Records
order clone cards Online
clone cards for sale near me
clone cards with chip
deep insert atm skimmer for sale
buy dumps near me
clone cards with balance
file tax returns
Qicarwow USB Magnetic Card Reader
hack telegram account
fake school results
order atm skimmer online
fake sun for sale online
authentic ielts certificate for sale
buy id cards online
buy counterfeit dollars
fake Drivers License for sale near me
purchase clone cards
buy drivers license online
fake credit card
social security card for newborn
Buy Clone Cards
ReplyDeleteBuy Dumps with Pin Fullz
Buy Ledger Nano X
Buy Qicarwow USB Magnetic Card Reader
Buy Universal Deep Insert ATM Skimmer
Hack Social Media Accounts
Remove Criminal Records From Database
Buy Fake Bills Online
Buy ID Cards Online
Buy Drivers License Online
Buy Social Security Number (SSN)
Change Examination Results
File Tax Returns Online
Buy IELTS Certificate
High Balance Clone Cards for sale
Cheap Clone Cards for sale
SSN card for sale
counterfeit money for sale
ReplyDeleteBuy drivers license online
clone cards with balance
Buy clone cards near me
Buy counterfeit bills
Buy fake id
ssn for sale near me
buy atm skimmers
pay to hack social media accounts
order clone cards
Drivers License for sale
Buy counterfeit bills
ielts certificate for sale
qicarwow usb magnetic card reader
Change Examination Results
High Balance Clone Cards for sale
Clearing your name
Buy Clone Cards online
clone cards for sale
Buy legit drivers license
buy fake bills
buy fake id
ssn for sale