User: Henn -- 2012-06-03 << 955 957 >> |
Hits: 3764 |
Type: Text file parser |
Search all Text file parser examples |
Description: |
How to extract text after last comma in a string? I wantt to extract the city names of reoccuring string-patterns into an excel file. The source is a local htmlx file. Identifier is the arrow in the line before and the last comma. Thank you very much for your support!! Greets :) |
Input Sample: |
... <div class="company_result"> <!-- Firma hier nur anzeigen, wenn keine Tochter vorhanden --> <span>company_name_1, additional_information_1, city</span> <span>useless_information</span> <!-- Associated Companies --> ... <div class="company_result"> <!-- Firma hier nur anzeigen, wenn keine Tochter vorhanden --> <span>company_name_2, additional_information_2, city-town</span> <!-- Associated Companies --> ... [Comment: the arrow (-->) in the line before "company" is needet as id |
Output Sample: |
city city-town |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open htmlx file 2. ctrl-h open 'replace' dialogue * set 'search for pattern' to: * set 'replace with pattern' to: * uncheck option of 'print unmatched unit' 3. click 'replace', done. 4. copy the output and paste to excel, or simply save the result as output.csv file. |
Screenshot 1: Replace_Window |
Similar Examples: |
How to extract all text enclosed by H1 tag from multiple html files? (64%) How to batch extract A1~A5 from txt file to a single file? (61%) How to extract all specified links from a html file? (61%) How to delete all text after the second comma in each line? (61%) How to remove/delete text after </html> in many html files? (61%) Need to extract all links from html file (60%) How to extract text between specified start and end strings? (59%) How to remove everything after the first comma in each line in a text file? (59%) |
Check Demo of Text file parser |
Keywords: |
extract text after last comma span last comma math excel support line before names copy before extract text after last comma excel replace last comma in a text file excel text in string after last comma excel extract text after last comma copy last line copy string copy text before save as excel |