regular_expressions
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
regular_expressions [2019/03/24 22:24] – created steve | regular_expressions [2019/03/24 22:25] – steve | ||
---|---|---|---|
Line 3: | Line 3: | ||
Using regular expressions will help you do some advanced querying and data manipulation. I've mostly used them in PostgreSQL. | Using regular expressions will help you do some advanced querying and data manipulation. I've mostly used them in PostgreSQL. | ||
- | I don't have any examples of code, but I have an uncompleted [[lds-scriptures.js|Javascript project]] where I use them a lot. | + | I don't have any examples of code, but I have an uncompleted [[lds-scriptures.js|Javascript project]] where I use them. |
Here's some code that is a regular expression that will do forward and reverse lookups for "Book Chapter Verse(s)" | Here's some code that is a regular expression that will do forward and reverse lookups for "Book Chapter Verse(s)" | ||
+ | |||
+ | The context here is not related to the databases, but to examine a source of text data and find the strings that match. | ||
< | < | ||
+ | var p_book_titles = " | ||
+ | |||
+ | var p_book_short_titles = " | ||
+ | |||
// Find all the range strings | // Find all the range strings | ||
var pattern = ""; | var pattern = ""; |
regular_expressions.txt · Last modified: by steve