greycat 1152730709 learn Some people, when confronted with a problem, think ``I know, I'll use regular expressions.'' Now they have two problems. -- jwz igli 1177620448 forget igli 1177620483 learn Some people, when confronted with a problem, think ``I know, I'll use regular expressions.'' Now they have two problems. -- jwz # For a basic intro see: http://www.faqs.org/docs/abs/HTML/regexp.html | and | http://www.grymoire.com/Unix/Regular.html | http://www.regular-expressions.info/ has good examples. greycat 1179170897 forget greycat 1179170909 learn Some people, when confronted with a problem, think ``I know, I'll use regular expressions.'' Now they have two problems. -- jwz ormaaj 1358919430 forget ormaaj 1358919442 learn redir =~ ormaaj 1358919543 forget ormaaj 1358919562 learn #redirect =~ lhunath 1374688521 forget lhunath 1374688538 learn Regular Expressions are used to *match* certain patterns in strings. They come in several flavors (BRE, ERE, PCRE, and more). Bash only supports EREs (using [[ string =~ pattern ]]). Sed uses BREs. See !ere, !bre, !pcre, http://mywiki.wooledge.org/RegularExpression