70 likes | 187 Views
Regular Expressions. What is it 4?. Text searching & replacing Sequence searching (input, DNA) Sequence Tracking Machine Operation logic machines that are not quite computers - ex: some control circuitry. Why learn it?. Powerful for Searching Simplistic and TIME SAVING Extremely fast
E N D
What is it 4? • Text searching & replacing • Sequence searching (input, DNA) • Sequence Tracking • Machine Operation • logic machines that are not quite computers - ex: some control circuitry
Why learn it? • Powerful for Searching • Simplistic and TIME SAVING • Extremely fast • Repeating characters, case control, optional character sets, alternate patterns • Find multiple sub-strings
Why learn it? • To put it on a resume • Be more productive working with text documents: code, xml, databases, etc. • Easy maintenance • Easier to understand (than alternative) • Smaller Code
Why learn it? • Standardized (somewhat) • Editors, IDEs(vi, grep, php, Eclipse) • CS Concepts
“Regular Expression” • grep patterns = “Regular Expression” • Pattern matching, such as: • Searching text - WILDCARDS++ • Replacing parts of the found text • Multiple-FILE search & replace!
Learning • Use a Text Editor that supports RegExp or Grep Patterns (best use Perl Library: PCRE) • Use the Regular Expression Play Pen webpage (class website) • Experiment, make notes for future