Regular Expressions

From BR Wiki
(Redirected from Regular expressions)
Jump to navigation Jump to search

In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. Regular expressions (abbreviated as regex or regexp, with plural forms regexes, regexps, or regexen) are written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.

Many programs support regular expression based searching. For a list of some of these programs see the Supports Regular Expressions Category.


External Resources

Handy Cheat Sheet

I've done only a little basic research with regular expressions, but this should serve as a quick start for later research.

I hope every thing shows up okay here. If not refer to the old jottit wiki.


find all whole lines that have FNNUM in them

^.*FNNUM.*$

find all whole lines that have FNNUM$ in them

^.*FNNUM[$].*$

or

(^.*FNNUM\$\(.*$)

find all whole lines that have FNNUM$( in them

^.*FNNUM[$]\(.*$

find all matching lines ... from the beginning to the end of FNNUM$(

^.*FNNUM[$]\(

find all matching lines from FNNUM$( to the end of the line

FNNUM[$]\(.*$

finds all matching FNNUM$( entries (ends at "(")

FNNUM[$]\(.*$

find all matching FNNUM$( and the first letter after it which may be A-Z or " or ' or a-z

FNNUM[$]\([a-zA-Z'"]

find entire FNUM$ call ... all the way to the first closing parenthesis... including A-Z, a-z,',",_,1-9, and ,(comma).

FNNUM[$]\([a-zA-Z'"$,_1-9]*\)
(something funny with that last one...)

find any line that contains print and list

.*print.*list.*