1

У меня есть текстовый файл с тысячами слов. Этот текстовый файл также содержит несколько электронных писем. Я хотел получить все эти письма только из текстового файла. Может кто-нибудь, пожалуйста, помогите мне. Я пробовал несколько способов в notepad++, но регулярное выражение не создано должным образом для получения электронных писем.

Вот образец:

{
    {
        "freshers": [{
            "last_name": "Dharmani",
            "uid": 14429319,
            "mail": "a13dharmani@gmail.com",
            "skill_knowns": ["7",
            "3"],
            "mobile_no": "asnbncbnabsnm",
            "hq_mark_type": "cgpa",
            "course_id": "16",
            "university_name": "gujarat technological university",
            "branch_id": "177",
            "first_name": "Anisha",
            "course_name": "BE\/B.Tech",
            "institute_state_id": "11",
            "date_of_birth": "13-October-1992",
            "last_login": "30-Nov-2015",
            "candidate_state_name": "Gujarat",
            "candidate_city_id": "43",
            "status": 1,
            "freshers_category": "20",
            "institute_state_name": "Gujarat",
            "candidate_city_name": "Vadodara",
            "institute_name": "Sardar Vallabhbhai Patel Institute of Technology, Vasad",
            "contact_no": "3012307",
            "branch_name": "Information Science\/Technology (IS\/IT)",
            "skill_academic": ["3",
            "14",
            "8",
            "3",
            "14",
            "8",
            "3",
            "14",
            "8"],
            "candidate_state_id": "11",
            "resume_path": "upload-resume\/2015\/11\/30\/resume_14429319_1448873130.pdf",
            "qualification_type": "Graduation",
            "mobile_verify": "0",
            "src": "",
            "branch_short_name": "IT",
            "created": "23-Feb-2015",
            "hq_institute_id": "294622",
            "gender": "Female",
            "fw_id": "FW16774601",
            "picture_path": "file\/9593b209f58991f2132e4ac556de28d2.jpg",
            "hq_mark": 7.8,
            "skills": "ASP.NET,C++,HTML,MicroSoft(MS)SQL,Ajax,C#,CSS,JavaSript",
            "is_resume_available": "1",
            "hq_passout_year": 2015
        },
        {
            "last_name": "Chanda",
            "uid": 14727731,
            "mail": "ansumitra.chanda@gmail.com",
            "mobile_no": "alsjhasljals",
            "hq_mark_type": "percentage",
            "course_id": "16",
            "university_name": "Nagpur University",
            "branch_id": "177",
            "first_name": "Ansumitra",
            "course_name": "BE\/B.Tech",
            "institute_state_id": "20",
            "date_of_birth": "05-July-1989",
            "last_login": "30-Nov-2015",
            "candidate_state_name": "Karnataka",
            "candidate_city_id": "65",
            "status": 1,
            "freshers_category": "20",
            "institute_state_name": "Maharashtra",
            "candidate_city_name": "Bangalore",
            "institute_name": "Priyadarshini College of Engineering, Nagpur",
            "contact_no": "",
            "branch_name": "Information Science\/Technology (IS\/IT)",
            "candidate_state_id": "16",
            "resume_path": "upload-resume\/2015\/09\/12\/resume_14727731_1442002613.doc",
            "qualification_type": "Graduation",
            "mobile_verify": "0",
            "src": "home_link2",
            "branch_short_name": "IT",
            "created": "15-Jun-2015",
            "hq_institute_id": "318237",
            "gender": "Female",
            "fw_id": "FW17072975",
            "picture_path": "",
            "hq_mark": 58,
            "is_resume_available": "1",
            "hq_passout_year": 2015
        },
        {
            "last_name": "mp",
            "uid": 15056653,
            "mail": "shruthirao.shru@gmail.com",
            "mobile_no": "klasjklajskjasl",
            "hq_mark_type": "percentage",
            "course_id": "16",
            "university_name": "Visveswaraiah Technological University",
            "branch_id": "177",
            "first_name": "Shruthi",
            "course_name": "BE\/B.Tech",
            "institute_state_id": "16",
            "date_of_birth": "12-May-1993",
            "last_login": "30-Nov-2015",
            "candidate_state_name": "Karnataka",
            "candidate_city_id": "65",
            "status": 1,
            "freshers_category": "20",
            "candidate_sublocation_id": "6",
            "institute_state_name": "Karnataka",
            "candidate_city_name": "Bangalore",
            "job_type": "0,Full Time,0",
            "institute_name": "East West Institute of Technology (EWIT), Bangalore",
            "contact_no": "",
            "branch_name": "Information Science\/Technology (IS\/IT)",
            "candidate_state_id": "0",
            "resume_path": "upload-resume\/2015\/11\/27\/resume_15056653_1448614939.docx",
            "qualification_type": "Graduation",
            "mobile_verify": "0",
            "src": "short_reg",
            "branch_short_name": "IT",
            "created": "08-Sep-2015",
            "hq_institute_id": "1363",
            "gender": "Female",
            "fw_id": "FW17401821",
            "picture_path": "",
            "hq_mark": 66.29,
            "skills": "",
            "is_resume_available": "1",
            "hq_passout_year": 2015,
            "candidate_sublocation_name": "Basavanagudi "
        },
        {
            "last_name": "Lakshmi",
            "uid": 14521915,
            "mail": "vinayabaremane@gmail.com",
            "skill_knowns": ["6",
            "7",
            "164"],
            "mobile_no": "ajlshjahsjahs",
            "hq_mark_type": "percentage",
            "course_id": "16",
            "university_name": "Visveswaraiah Technological University",
            "branch_id": "177",
            "first_name": "Vinaya",
            "course_name": "BE\/B.Tech",
            "institute_state_id": "16",
            "date_of_birth": "14-February-1994",
            "last_login": "30-Nov-2015",
            "candidate_state_name": "Karnataka",
            "candidate_city_id": "65",
            "status": 1,
            "freshers_category": "20",
            "candidate_sublocation_id": "16",
            "institute_state_name": "Karnataka",
            "candidate_city_name": "Bangalore",
            "job_type": "0,Full Time,0",
            "institute_name": "Vivekananda College Of Engineering And Technology (VCET), Puttur",
            "contact_no": "25
        }

1 ответ1

1

Вы можете попробовать следующее регулярное выражение

[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}

Я использую это же регулярное выражение для моего клиента. Надеюсь, поможет.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .