Skip to main content

String Matching Algorithm

  • Reference work entry
  • First Online:
Encyclopedia of Machine Learning and Data Mining
  • 115 Accesses

A string matching algorithm returns parts of text matching a given pattern, such as a regular expression. Such algorithms have countless applications, from file editing to bioinformatics. Many algorithms compute deterministic finite automata, which can be expensive to build, but are usually efficient to use; they include the Knuth–Morris–Pratt algorithm and the Boyer–Moore algorithm, that build the automaton in time O(m) and O(m + s), respectively, where m is the length of the pattern and s the size of the alphabet, and match a text of length n in time O(n) in the worst case.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 699.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 949.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer Science+Business Media New York

About this entry

Cite this entry

(2017). String Matching Algorithm. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning and Data Mining. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-7687-1_791

Download citation

Publish with us

Policies and ethics