Seek Position of a String in a Stream

Yesterday I was working on a bit of code that had to read the XMP meta data from a file. It is not located at a certain position, so I had to scan the file. XMP, being plain XML, can be found by simple string matching. After some searching I’ve found many solutions that read the entire file into memory and perform a regular expression search or a string comparison. That’s not going to work for me, because I have files that are +100MB! So I wrote some code that does a search that performs.

Read the article Seek Position of a String in a Stream

Regular Expression Groups: .NET vs JavaScript

As a developer, I love solving common string problems with regular expressions. Sure, they are sometimes hard to read, but you can do so much with such a small expression! It is nice that many languages support them, although it sometimes feels like every language creates its own dialect. Let’s look at the differences between regular expression groups in .NET and JavaScript.

Read the article Regular Expression Groups: .NET vs JavaScript
expand_less brightness_auto