Working with Regular Expressions in C# - Final Words
(Page 5 of 5 )
We have just arrived to the end of this article. I hope you have found this journey educational and informative. By now you should be familiar with most of the inner secrets of Regular Expressions. Formatting a pattern in its formal and concise language won’t scare you away. Neither will you look surprised when you try to continue the piece of code that your co-worker has written and it contains funny looking patterns.
Surely, regular expressions aren’t that critical because the truth is you could pretty much write pattern matching algorithms right out of memory; you may be very familiar with the well-known and efficient algorithms such as the Knuth-Morris-Pratt and/or the Boyer-Moore variations. However, implementing these, especially in the case of patterns that we can’t know in advance (where meta-chars help) can become quite challenging.
Additionally, anybody that works in software development knows that resource efficiency—both computer resources and time— should never be sacrificed. Therefore, it makes sense to utilize something that is specifically designed to accomplish the task, and it does the job amazingly well; you only need to know how to use it.
Taking advantage of regular expressions can become quite fun. Once you get the hang of it you will be positively impressed by how frequently you’ll be able to use them, starting with your favorite word processor, various utilities, up to scripting and programming languages as well. You can save hundreds of lines of code with one line.
As a finale, I’d like to invite you to join our ever-growing and friendly community of tech-professionals at Dev Hardware Forums. We focus on all areas of IT&C: hardware, software, consumer electronics, around-the-clock IT news and more. You might also want to check out the forums of our sister site at Dev Shed. Take care.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |