c# - Approaches to do keyword search in FAQ -
my site (asp.net + c#) has faq data pull site's web service in xml format. data size pretty small (just 50 faqs). want implement keyword search faq , highlight search keyword. fast , easy approach this?
my first thought using c# string search or xml search method. know not scalable. consider faq little, may not need index faq. wrong. can give me suggestions? thanks.
the best solution using regular expressions. regex scales too, don't need worry speed. using regex replace, adding tag around matches make them stand out easy well.
you can find regex tutorial here. has info both general regex use, , link goes explanation .nets implementation.
regex has step learning curve, worth effort, because incredibly powerful.
Comments
Post a Comment