| User: editor -- 2011-07-28 << 826 828 >> |
| Hits: 270 |
| Type: Text file parser |
| Search all Text file parser examples |
| Description: |
| How to extract all lines with specified date range from text file? There is a date with format YYYY-MM-DD at the end of each line, how to extract all lines that has date range from 2010-08-01 to 2010-09-30? |
| Input Sample: |
| ......... 2010-08-05 ............. 2011-04-12 .......... 2006-11-18 ........... 2010-09-13 ............. 2010-06-04 |
| Output Sample: |
| ......... 2010-08-05 ........... 2010-09-13 |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open 'replace' dialog * set 'replace unit' to 'Line' * set 'replace with pattern' to: * uncheck "print unmatched unit" option * set 'If' to: 3. click "Replace", done. 4. ctrl-s save to file. Note: (1) Above operation means extract all lines if the last word of the line within 2010-08-01 and 2010-09-31 words($match,-1) means the last word of the line ge means "greater or equal to" le means "less or equal to" (2) You need to make date conversion if date is not format of YYYY-MM-DD |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to extract all specified date format from a text file? (85%) How to extract multiple lines in specified order from many text files? (82%) How to extract all lines with numbers from many text files? (75%) How to extract all characters within specified char set from a text file? (72%) How to extract all specified links from a html file? (72%) How to extract all numbers that are greater than 60 in a text file? (70%) How to batch extract specified lines from a text file? (70%) How to change columns in each line to specified order in text file? (68%) |
Check Demo of Text file parser |
| Keywords: |
| greater conversion range last word less how to extract all lines with 100 unmatched last date date extract from text file extract date from text file how to extract date from a text file text conversion extract last line all lines with word from text file text file conversion replace extract lines from word |