Using regular expressions in Java

  • Authors:
  • David R. Naugler

  • Affiliations:
  • Southeast Missouri State University, Cape Girardeau, MO

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2005

Quantified Score

Hi-index 0.01

Visualization

Abstract

Regular expressions provide a useful and terse way to specify lexical elements. They have long been used in Linux/Unix utilities such as the various greps, ed, vi, sed and awk. They were not widely available in programming languages used outside of the Unix/Linux environment until the programming language Perl, and indeed are one of Perl highlights. Quite recently regular expressions have become much more broadly available in mainstream programming languages, such as Java, C#, and Visual Basic .NET. In their chapter All Input is Evil! Howard and LeBlanc [1] strongly recommend the use of regular expressions as a major part of data validation. Unfortunately, many programmers have little knowledge of regular expressions.