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
Tilde
(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!
=====Regex===== The tilde is used in the [[AWK]] [[programming language]] as part of the pattern match operators for [[regular expression]]s:<ref>{{cite web |title=The GNU Awk User's Guide |website=GNU Manuals Online |url=https://www.gnu.org/software/gawk/manual/html_node/Regexp-Usage.html |publisher=Free Software Foundation, Inc. |access-date=2024-10-20 |at=3.1 How to Use Regular Expressions}}</ref> *<code>''variable'' ~ /''regex''/</code> returns true if the variable is matched. *<code>''variable'' !~ /''regex''/</code> returns false if the variable is matched. The operators are also used in the [[SQL]] variant of the database [[PostgreSQL]].<ref>{{cite web |title=PostgreSQL 17.0 Documentation |author=The PostgreSQL Global Development Group |date=2024-09-26 |url=https://www.postgresql.org/docs/17/index.html |access-date=2024-10-20 |at=[https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP 9.7.3.{{nbsp}}POSIX Regular Expressions]}}</ref> A variant of this, with the plain tilde replaced with <code>=~</code>, was adopted in [[Perl]]<ref>{{cite web |title=Perl expressions: operators, precedence, string literals |website=Perldoc Browser |url=https://perldoc.perl.org/5.40.0/perlop |access-date=2024-10-20 |at=[https://perldoc.perl.org/5.40.0/perlop#Binding-Operators Binding Operators]}}</ref><!--, and this semi-standardization has led to the use of these operators in other programming languages-->. [[Ruby programming language|Ruby]] also uses this variant without the negated operator.<ref>{{cite web |title=class Regexp |work=Documentation for Ruby 3.3 |url=https://docs.ruby-lang.org/en/3.3/Regexp.html |access-date=2024-10-20}}</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)