Home » Archives for Nikos Maravitsas » Page 11

Author Archives: Nikos Maravitsas

Nikos has graduated from the Department of Informatics and Telecommunications of The National and Kapodistrian University of Athens. During his studies he discovered his interests about software development and he has successfully completed numerous assignments in a variety of fields. Currently, his main interests are system’s security, parallel systems, artificial intelligence, operating systems, system programming, telecommunications, web applications, human – machine interaction and mobile development.

Validate HTML Tag with Java Regular Expression example

In this tutorial we are going to see how to validate HTML Tag format. In general, validating HTML with regular expressions in not the optimal method. You should use an HTML parser for that matter. But when you want to validate the basic HTML format, quickly in your application, Regular Expressions will do. So the basic policy of HTML tags ...

Read More »

Validate Date with Java Regular Expression example

In this tutorial we are going to see how to validate date format with Java Regular Expressions.The basic policy about  date of the form “dd/mm/yyyy” is that: It should start with two digits from 01 – 31 or from 1 – 31. It must be followed by ‘/’. It should be followed by two digits from 01- 12 or from ...

Read More »

Validate Email Address with Java Regular Expression example

Email validation is a very frequent requirement in many applications. Basically the main policy that email format follows is that it: Has to start with characters, digits or ‘_’, ‘-‘, ‘+’ symbols The above group can be followed with a ‘.’ and the same pattern as the first group. Then it must have exactly one ‘@’ character. The domain name ...

Read More »

How To Validate Hex Color Code With Regular Expression

In this tutorial we are going to see how to create a simple application that validates Hexadecimal Color Codes. The main policy abount Hex Color Codes denotes that it has to: Start with ‘#’ tag. Contain any lower case or uppercase characters from ‘a’ to ‘f’. Contain digits from ‘0’ to ‘9’. Have a length of 3 or 6 without ...

Read More »

Validate Password with Java Regular Expression example

In the previous tutorial on username validation we explained why input validation is important for your application’s security and data consistency. For our passwords we are going to implement a strict policy about their format. We want our passwords to : Be between 8 and 40 characters long Contain at least one digit. Contain at least one lower case character. ...

Read More »

Validate Username with Java Regular Expression example

When you are writing an application that requires authentication, in most cases, the users should provide a username among other credentials. It’s a very common security directive to perform an input validation on the credentials the users give. This is crucial for the security of your application and the consistency of your data in the application level of your system. ...

Read More »

JSON.Simple Example to read and write JSON in Java

In this example we are going to see a very nice JSON framwork, JSON.simple. In this tutorial we are going to see how to read and write JSON to file using this framework, and you will notice yourself how simple :) it really is. 1. JSON.simple library and dependencies If your are using Maven to build your project, you just ...

Read More »