Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use them quite frequently, probably because I'm mostly in a linux environment and have easy access to them.</p> <ul> <li>Searching for things in an editor, especially when I know two parts on a line but not what is inbetween (please excuse the extraneous whitespace) <ul> <li>Where is the reval function that takes a widget? "<code>reval.*\&lt;widget\&lt;</code>"</li> <li>Where is my_obj assigned to? "<code>\&lt;my_obj\&gt;.*=</code>"</li> </ul></li> <li>To search and replace in order to produce a modification of a data file: i.e., set all the delivery volumes to one "<code>#&lt;volume&gt;[-0-9.]+&lt;/volume&gt;#&lt;volume&gt;1.0&lt;/volume&gt;</code>#g"</li> <li>To munge output to fit on the screen (removing whitespace or uninteresting fields).</li> <li>To munge data files into another format, such as taking log files and producing a file for gnuplot which graphs performance data.</li> <li>For programmatic uses, such as pattern matching a data value's name in order to handle it differently if it matches certain criteria most easily expressed with a regular expression.</li> </ul> <p>After using regexes I hate the windows "Find" box because it is so limited.</p> <p>As another user answered, regular expressions are essentially more powerful globbing, but they go way beyond that. You don't need to read <a href="http://oreilly.com/catalog/9781565922570/" rel="nofollow noreferrer">"Master Regular Expressions"</a> to use them, but I do recommend the book. I'm sure there are plenty of resources on the internet, such as <a href="http://www.regular-expressions.info/" rel="nofollow noreferrer">here</a>, although I can't vouch for any of them.</p> <p>Another advantage to using regular expressions (whether in code or on the command line) is that they have been heavily optimized. Grep and <a href="http://en.wikipedia.org/wiki/21st_Century_Compilers" rel="nofollow noreferrer">DFA parsers</a> in particular are almost certainly faster than what you would write on your own... and more likely to be correct the first time. Don't reinvent the wheel when you have such a nice one handy.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload