Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
String-searching algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Searching for patterns in text}} A '''string-searching algorithm''', sometimes called '''string-matching algorithm''', is an [[algorithm]] that searches a body of [[string (computer science)|text]] for portions that match by pattern. A basic example of string searching is when the pattern and the searched text are [[Array data structure|arrays]] of elements of an [[Alphabet (computer science)|alphabet]] ([[finite set]]) Ξ£. Ξ£ may be a human language alphabet, for example, the letters ''A'' through ''Z'' and other applications may use a ''binary alphabet'' (Ξ£ = {0,1}) or a ''DNA alphabet'' (Ξ£ = {A,C,G,T}) in [[bioinformatics]]. In practice, the method of feasible string-search algorithm may be affected by the string encoding. In particular, if a [[variable-width encoding]] is in use, then it may be slower to find the ''N''th character, perhaps requiring time proportional to ''N''. This may significantly slow some search algorithms. One of many possible solutions is to search for the sequence of code units instead, but doing so may produce false matches unless the encoding is specifically designed to avoid it.{{citation needed|date=August 2017}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)