|
1 | 1 | export const REGEX_PATTERNS = { |
2 | | - // Contact Information |
3 | | - EMAIL: /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/, |
4 | | - LINKEDIN: /(?:www\.)?linkedin\.com\/in\/([\w-]+)/i, |
| 2 | + EMAIL: /\b[\w._%+-]+@[\w.-]+\.[A-Z|a-z]{2,}\b/, |
| 3 | + LINKEDIN: /linkedin\.com\/in\/([\w-]+)/i, |
5 | 4 | PHONE: /(\+\d{1,3}\s?)?(\(?\d{2,3}\)?[\s-]?)?\d{4,5}[\s-]?\d{4}/, |
6 | | - |
7 | | - // Content Sections |
8 | 5 | PAGE_NUMBERS: /Page \d+ of \d+/gi, |
9 | | - TOP_SKILLS: /Top Skills\s+([\s\S]+?)(?:Languages|Idiomas)/i, |
10 | | - LANGUAGES: |
11 | | - /Languages\s+([\s\S]+?)(?:Summary|Resumo|Experiência|Experience|Education|Educação|$)/i, |
12 | | - SUMMARY: |
13 | | - /(?:Summary|Resumo)\s+([\s\S]+?)(?:Experience|Experiência|Education|Educação|$)/i, |
14 | | - EXPERIENCE: |
15 | | - /(?:Experience|Experiência)\s+([\s\S]+?)(?:Education|Educação|$)/i, |
16 | | - EDUCATION: /(?:Education|Educação)\s+([\s\S]+?)(?:$)/i, |
17 | | - |
18 | | - // Profile Information |
| 6 | + TOP_SKILLS: /Top Skills\s+([\s\S]+?)(?:Languages)/i, |
| 7 | + LANGUAGES: /Languages\s+([\s\S]+?)(?:Summary|Experience|Education|$)/i, |
| 8 | + SUMMARY: /Summary\s+([\s\S]+?)(?:Experience|Education|$)/i, |
| 9 | + EXPERIENCE: /Experience\s+([\s\S]+?)(?:Education|$)/i, |
| 10 | + EDUCATION: /Education\s+([\s\S]+?)(?:$)/i, |
19 | 11 | NAME: /^([A-Z][a-z]+(?: [A-Z][a-z]+)*)/m, |
20 | 12 | LOCATION: /([A-Z][a-z]+(?:,\s*[A-Z][a-z]+)*(?:,\s*[A-Z]{2,})?)/, |
21 | | - |
22 | | - // Language Proficiency |
23 | | - LANGUAGE_PROFICIENCY: |
24 | | - /(Native|Bilingual|Professional|Elementary|Limited|Fluent|Working)/i, |
25 | | - |
26 | | - // Date Patterns |
27 | | - DATE_RANGE: |
28 | | - /(\w+\s+\d{4})\s*(?:-|–|to|até)\s*(\w+\s+\d{4}|Present|Presente)/i, |
| 13 | + LANGUAGE_PROFICIENCY: /(Native|Professional|Elementary|Limited)/i, |
| 14 | + DATE_RANGE: /(\w+\s+\d{4})\s*[-–]\s*(\w+\s+\d{4}|Present)/i, |
29 | 15 | YEAR: /\b(19|20)\d{2}\b/g, |
30 | | - |
31 | | - // Common Separators |
32 | 16 | LINE_BREAK: /\r?\n/g, |
33 | 17 | MULTIPLE_SPACES: /\s{2,}/g, |
34 | | - BULLET_POINTS: /^[\u2022\u2023\u25E6\u2043\u2219•·‣⁃]\s*/gm, |
35 | | -} as const; |
36 | | - |
37 | | -export const SECTION_KEYWORDS = { |
38 | | - CONTACT: ['contact', 'contato'], |
39 | | - SKILLS: ['skills', 'habilidades', 'competências'], |
40 | | - LANGUAGES: ['languages', 'idiomas'], |
41 | | - SUMMARY: ['summary', 'resumo', 'about'], |
42 | | - EXPERIENCE: ['experience', 'experiência', 'work', 'trabalho'], |
43 | | - EDUCATION: ['education', 'educação', 'formação'], |
44 | | - CERTIFICATIONS: ['certifications', 'certificações', 'certificates'], |
| 18 | + BULLET_POINTS: /^[\u2022•]\s*/gm, |
45 | 19 | } as const; |
46 | 20 |
|
47 | | -export const LANGUAGE_LEVELS = [ |
48 | | - 'Native or Bilingual', |
49 | | - 'Native', |
50 | | - 'Bilingual', |
51 | | - 'Full Professional', |
52 | | - 'Professional Working', |
53 | | - 'Professional', |
54 | | - 'Limited Working', |
55 | | - 'Elementary', |
56 | | - 'Beginner', |
57 | | -] as const; |
0 commit comments