mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-06 16:07:17 +08:00
support multi line regexp
This commit is contained in:
@@ -370,7 +370,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
try {
|
try {
|
||||||
if (expectJobNameRegExpStr.trim()) {
|
if (expectJobNameRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobNameRegExpStr, 'i')
|
const regExp = new RegExp(expectJobNameRegExpStr, 'i')
|
||||||
isJobNameSuit = regExp.test(jobInfo.jobName)
|
isJobNameSuit = regExp.test(jobInfo.jobName?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
@@ -378,7 +378,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
try {
|
try {
|
||||||
if (expectJobTypeRegExpStr.trim()) {
|
if (expectJobTypeRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobTypeRegExpStr, 'i')
|
const regExp = new RegExp(expectJobTypeRegExpStr, 'i')
|
||||||
isJobTypeSuit = regExp.test(jobInfo.positionName)
|
isJobTypeSuit = regExp.test(jobInfo.positionName?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ export function testIfJobTitleOrDescriptionSuit (jobInfo, matchLogic) {
|
|||||||
try {
|
try {
|
||||||
if (expectJobDescRegExpStr.trim()) {
|
if (expectJobDescRegExpStr.trim()) {
|
||||||
const regExp = new RegExp(expectJobDescRegExpStr, 'i')
|
const regExp = new RegExp(expectJobDescRegExpStr, 'i')
|
||||||
isJobDescSuit = regExp.test(jobInfo.postDescription)
|
isJobDescSuit = regExp.test(jobInfo.postDescription?.replace(/\n/g, '') ?? '')
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-2
@@ -35,7 +35,7 @@ const expectJobFilterTemplateList = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: '互联网/AI',
|
type: '互联网/AI',
|
||||||
name: '前端开发工程师、JavaScript',
|
name: '前端开发工程师',
|
||||||
config: {
|
config: {
|
||||||
expectJobNameRegExpStr: '前端|H5|\\bFE\\b',
|
expectJobNameRegExpStr: '前端|H5|\\bFE\\b',
|
||||||
expectJobTypeRegExpStr: '前端开发|javascript',
|
expectJobTypeRegExpStr: '前端开发|javascript',
|
||||||
@@ -43,6 +43,17 @@ const expectJobFilterTemplateList = [
|
|||||||
jobDetailRegExpMatchLogic: JobDetailRegExpMatchLogic.SOME
|
jobDetailRegExpMatchLogic: JobDetailRegExpMatchLogic.SOME
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: '互联网/AI',
|
||||||
|
name: '前端开发工程师(不考虑外包、兼职)',
|
||||||
|
config: {
|
||||||
|
expectJobNameRegExpStr: '^(?=.*(前端|H5|\\bFE\\b))(?!.*(?:外包|驻场|外派|兼职|短期))',
|
||||||
|
expectJobTypeRegExpStr: '前端开发|javascript',
|
||||||
|
expectJobDescRegExpStr:
|
||||||
|
'^(?=.*(前端|vue|react|node|\\bjs\\b|javascript|H5))(?!.*(?:外包|驻场|外派|兼职|短期))',
|
||||||
|
jobDetailRegExpMatchLogic: JobDetailRegExpMatchLogic.EVERY
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: '互联网/AI',
|
type: '互联网/AI',
|
||||||
name: '测试工程师、测试开发',
|
name: '测试工程师、测试开发',
|
||||||
@@ -193,7 +204,7 @@ const expectJobFilterTemplateList = [
|
|||||||
expectJobNameRegExpStr: '招聘|高招|Recruiter|HR|人力|人资|人事',
|
expectJobNameRegExpStr: '招聘|高招|Recruiter|HR|人力|人资|人事',
|
||||||
expectJobTypeRegExpStr: '招聘|猎头|人力',
|
expectJobTypeRegExpStr: '招聘|猎头|人力',
|
||||||
expectJobDescRegExpStr:
|
expectJobDescRegExpStr:
|
||||||
'招聘|高招|Recruiter|简历|面试|人才引进|Mapping|人才画像|offer|猎头|内推|外推|猎聘|Boss|拉勾|前程无忧|智联|58同城|领英|LinkedIn|ATS|人才库|Moka|北森|iTenant|倍罗|大易|伯乐',
|
'招聘|高招|Recruiter|简历|面试|人才引进|Mapping|人才画像|offer|猎头|内推|外推|猎聘|Boss|拉勾|前程无忧|智联|58同城|领英|LinkedIn|ATS|人才库|Moka|北森|iTenant|倍罗|大易',
|
||||||
jobDetailRegExpMatchLogic: JobDetailRegExpMatchLogic.EVERY
|
jobDetailRegExpMatchLogic: JobDetailRegExpMatchLogic.EVERY
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user