ClanKiller.com http://forums.clankiller.com/ |
|
c# method to parse a search string http://forums.clankiller.com/viewtopic.php?f=24&t=2695 |
Page 1 of 1 |
Author: | Satis [ Fri Dec 28, 2007 7:44 am ] | |||||||||
Post subject: | c# method to parse a search string | |||||||||
I wrote this method to take an input "search" and parse out phrases that are surrounded by either double or single quotes. This approximates an "exact match" type of search. I look for double quotes first, remove any double-quoted matches, then reparse for single quote blocks. Anything left over after that is broken up into individual terms on spaces. It returns an ArrayList (basically an array that can dynamically grow).
|
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |