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
Regular expression
(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!
==Uses== {{More citations needed section|date=January 2025}} Regexes are useful in a wide variety of text processing tasks, and more generally [[string processing]], where the data need not be textual. Common applications include [[data validation]], [[data scraping]] (especially [[web scraping]]), [[data wrangling]], simple [[parsing]], the production of [[syntax highlighting]] systems, and many other tasks. Some high-end [[desktop publishing]] software has the ability to use regexes to automatically apply text styling, saving the person doing the layout from laboriously doing this by hand for anything that can be matched by a regex. For example, by defining a [[style sheet (desktop publishing)|character style]] that makes text into [[small caps]] and then using the regex <code>[A-Z]{4,}</code> to apply that style, any word of four or more consecutive capital letters will be automatically rendered as small caps instead. While regexes would be useful on Internet [[search engine (computing)|search engines]], processing them across the entire database could consume excessive computer resources depending on the complexity and design of the regex. Although in many cases system administrators can run regex-based queries internally, most search engines do not offer regex support to the public. Notable exceptions include [[Google Code Search]] and [[Exalead]]. However, Google Code Search was shut down in January 2012.<ref>{{cite web |last=Horowitz |first=Bradley |author-link=Bradley Horowitz |url=https://googleblog.blogspot.com/2011/10/fall-sweep.html |title=A fall sweep |date=24 October 2011 |access-date=4 May 2019 |work=[[Google Blog]] |archive-date=21 October 2018 |archive-url=https://web.archive.org/web/20181021074737/https://googleblog.blogspot.com/2011/10/fall-sweep.html |url-status=live}}</ref>
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)