File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/doc/net-imap-0.3.4/ri/Net/IMAP/search-i.ri
U:RDoc::AnyMethod[iI"search:ETI"Net::IMAP#search;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [
I"hSends a {SEARCH command [IMAP4rev1 §6.4.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.4] ;TI"Gto search the mailbox for messages that match the given searching ;TI"Mcriteria, and returns message sequence numbers. +keys+ can either be a ;TI"Mstring holding the entire search string, or a single-dimension array of ;TI"#search keywords and arguments.;To:RDoc::Markup::BlankLine o;
; [I"Related: #uid_search;T@S:RDoc::Markup::Heading:
leveli
: textI"Search criteria;T@o;
; [
I")For a full list of search criteria, ;TI"[see [{IMAP4rev1 §6.4.4}[https://www.rfc-editor.org/rfc/rfc3501.html#section-6.4.4]], ;TI"[or [{IMAP4rev2 §6.4.4}[https://www.rfc-editor.org/rfc/rfc9051.html#section-6.4.4]], ;TI"&in addition to documentation for ;TI"dany [CAPABILITIES[https://www.iana.org/assignments/imap-capabilities/imap-capabilities.xhtml]] ;TI"Nreported by #capability which may define additional search filters, e.g: ;TI"M+CONDSTORE+, +WITHIN+, +FILTERS+, <tt>SEARCH=FUZZY</tt>, +OBJECTID+, or ;TI"@+SAVEDATE+. The following are some common search criteria:;T@o:RDoc::Markup::List:
@type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"<message set>;T; [o;
; [I"@a set of message sequence numbers. "<tt>,</tt>" indicates ;TI":an interval, "+:+" indicates a range. For instance, ;TI":"<tt>2,10:12,15</tt>" means "<tt>2,10,11,12,15</tt>".;T@o;;[I"BEFORE <date>;T; [o;
; [ I"4messages with an internal date strictly before ;TI"<<b><date></b>. The date argument has a format similar ;TI"8to <tt>8-Aug-2002</tt>, and can be formatted using ;TI"Net::IMAP.format_date.;T@o;;[I"BODY <string>;T; [o;
; [I"6messages that contain <string> within their body.;T@o;;[I"CC <string>;T; [o;
; [I"4messages containing <string> in their CC field.;T@o;;[I"FROM <string>;T; [o;
; [I"8messages that contain <string> in their FROM field.;T@o;;[I"NEW;T; [o;
; [I"<messages with the \Recent, but not the \Seen, flag set.;T@o;;[I"NOT <search-key>;T; [o;
; [I"%negate the following search key.;T@o;;[I"!OR <search-key> <search-key>;T; [o;
; [I"#"or" two search keys together.;T@o;;[I"ON <date>;T; [o;
; [I"=messages with an internal date exactly equal to <date>, ;TI".which has a format similar to 8-Aug-2002.;T@o;;[I"SINCE <date>;T; [o;
; [I"7messages with an internal date on or after <date>.;T@o;;[I"SUBJECT <string>;T; [o;
; [I"-messages with <string> in their subject.;T@o;;[I"TO <string>;T; [o;
; [I".messages with <string> in their TO field.;T@S;;
i
;I"For example:;T@o:RDoc::Markup::Verbatim; [I"7p imap.search(["SUBJECT", "hello", "NOT", "NEW"])
;TI"#=> [1, 6, 7, 8];T:@format0:
@fileI"lib/net/imap.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(keys, charset = nil);T@FI" IMAP;TcRDoc::NormalClass00