<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar/521146654896437969?origin\x3dhttps://csctwothirtysix.blogspot.com', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Saturday, November 15, 2008

Regular Expressions

Regular expressions proves to be very useful. For example, we can use the regular expression "\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b" to search for an email address*. Since I first learned about regular expressions in 207 I was not as confused although our approach in 207 seems to be different.

Proving that a regular expression denotes a language follows the [IF] and [ONLYIF] structure using concatenation on an arbitrary string. Since this is a prove, we already have the regular expression which makes concatenating much easier.

Term Test 2:
It was pretty easy. In fact, too easy. Too easy it makes me mad at myself for studying that horrible looking double-loop.

Problem Set #5:
Well, my first instinct was induction. It was, using it on what, which seemed a bit odd.

*http://www.regular-expressions.info/

0 Comments:

Post a Comment

<< Home