About: Regular Expressions   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Education | Version Control | Introduction to Programming | Unit Testing

AttributesValues
rdfs:label
  • Regular Expressions
  • Regular expressions
rdfs:comment
  • Education | Version Control | Introduction to Programming | Unit Testing
  • Intro text about regular expressions goes here How to learn goes here Examples go here function extractFrom(data, prefix, suffix) { var item = data.match(esc(prefix) + '([.\s\S]*?)' + esc(suffix)); if (item != null) return item[1]; return ""; } function esc(s) { var alfa = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var t = ""; for (i = 0; i < s.length; i++) { if (alfa.indexOf(s[i]) >= 0) { t += s[i];} else if ((" " <= s[i]) && (s[i] < String.fromCharCode(127))) { t += "\" + s[i]; } else t += s[i]; } return t; }
  • The Delphi IDE Editor has a checkbox for Regular Expressions in the Find, Replace, and Find in Files menus. They are documented in the Delphi 5, 6 and 7 help. There are two flavors: Regular Expressions and Brief Regular Expressions (if you have Brief keystroke mappings).
  • Regular expressions are a powerful pattern-matching tool. They allow patterns to be specified concisely and flexibly. For example, a regular expression to match a Zip code might look like \d{5}(\-\d{4})? -- 5 digits, optionally followed by a dash and 4 more digits. Craig Boyd has written an FLL called RegExp that allows VFP to use regexps without calling out to a COM library, as the FFC class does. Using it, we see that: lcZipRegex = "\d{5}(\-\d{4})?" ?regexp("02908", lcZipRegex) && .T. ?regexp("02908-2148", lcZipRegex) && .T. ?regexp("029082175", lcZipRegex) && .F.
dcterms:subject
dbkwik:foxpro/prop...iPageUsesTemplate
dbkwik:konfabulato...iPageUsesTemplate
abstract
  • Education | Version Control | Introduction to Programming | Unit Testing
  • Intro text about regular expressions goes here How to learn goes here Examples go here function extractFrom(data, prefix, suffix) { var item = data.match(esc(prefix) + '([.\s\S]*?)' + esc(suffix)); if (item != null) return item[1]; return ""; } function esc(s) { var alfa = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var t = ""; for (i = 0; i < s.length; i++) { if (alfa.indexOf(s[i]) >= 0) { t += s[i];} else if ((" " <= s[i]) && (s[i] < String.fromCharCode(127))) { t += "\" + s[i]; } else t += s[i]; } return t; }
  • The Delphi IDE Editor has a checkbox for Regular Expressions in the Find, Replace, and Find in Files menus. They are documented in the Delphi 5, 6 and 7 help. There are two flavors: Regular Expressions and Brief Regular Expressions (if you have Brief keystroke mappings).
  • Regular expressions are a powerful pattern-matching tool. They allow patterns to be specified concisely and flexibly. For example, a regular expression to match a Zip code might look like \d{5}(\-\d{4})? -- 5 digits, optionally followed by a dash and 4 more digits. Craig Boyd has written an FLL called RegExp that allows VFP to use regexps without calling out to a COM library, as the FFC class does. Using it, we see that: lcZipRegex = "\d{5}(\-\d{4})?" ?regexp("02908", lcZipRegex) && .T. ?regexp("02908-2148", lcZipRegex) && .T. ?regexp("029082175", lcZipRegex) && .F. An equivalent comparison in Xbase code would be quite a bit wordier.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software