« Week2 - Xport | Main | Tangible data visualization »

Week2 - Regular Expressions

Still working with the txt.file that I exported from my itp blog, I started by replacing all characters and non characters on the file with one single character, in this case /.
I wanted to visualize the patterns that a txt file can created.

The important and simple code I had to write:

String regex = ".";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(content);
String output = m.replaceAll("/");

see the code // see the final txt file

TrackBack

TrackBack URL for this entry:
http://www.prntscreen.net/cgi-bin/mt/mt-tb.cgi/368

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on February 5, 2008 2:00 AM.

The previous post in this blog was Week2 - Xport.

The next post in this blog is Tangible data visualization.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.35