正则表达式以字符替换结束

时间:2019-06-18 12:47:31

标签: regex notepad++

任何人都可以解决此正则表达式吗?

  • 查找所有以(,PE开头和(,)结尾的字符串
  • 如何替换BEGIN(,'PE)和END(',),并保持MIDDLE(* unknown words here *)?
  • 因此,上面的示例将以,PE unknown words here,开始并以,'PE unknown words here',结束

有人知道正则表达式的学习资源,以便我自己解决此类问题吗?

正则表达式

已经...

,(96, 4, 7517, 'NEELAM FOODS INC', '001', PE NEELAM 10885 BEALETON, 100, 'GI FOODS, LLC', 1492985, 933308, '12-APR-19', '15-APR-19', 639.68, '07', 639.68, 60)
,(97, 5, 7517, 'NEELAM FOODS INC', '001', PE NEELAM 10885 BEALETON, 100, 'GI FOODS, LLC', 1493358, 934184, '16-APR-19', '17-APR-19', 475.38, '07', 475.38, 58)
,(115, 1, 7692, 'INDUS FOODS INC', '001', PE INDUS FOODS 11070, 100, 'GI FOODS, LLC', 1492297, 932026, '09-APR-19', '09-APR-19', 804.18, '07', 804.18, 66)
,(116, 2, 7692, 'INDUS FOODS INC', '001', PE INDUS FOODS 11070, 100, 'GI FOODS, LLC', 1492513, 932656, '10-APR-19', '11-APR-19', 724.22, '07', 724.22, 65)
,(117, 3, 7692, 'INDUS FOODS INC', '001', PE INDUS FOODS 11070, 100, 'GI FOODS, LLC', 1492871, 933265, '12-APR-19', '13-APR-19', 1115.06, '07', 1115.06, 63)
,(118, 4, 7692, 'INDUS FOODS INC', '001', PE INDUS FOODS 11070, 100, 'GI FOODS, LLC', 1493162, 933660, '15-APR-19', '16-APR-19', 843.08, '07', 843.08, 60)
,(120, 1, 7820, 'CHICKEN-R-US INC', '001', PE CHICKEN-R-US 11191, 200, 'DUMMY CO *fake*, LLC', 1492183, 932077, '08-APR-19', '09-APR-19', 599.7, '07', 599.7, 67)
,(121, 2, 7820, 'CHICKEN-R-US INC', '001', PE CHICKEN-R-US 11191, 200, 'DUMMY CO *fake*, LLC', 1492932, 933330, '12-APR-19', '13-APR-19', 1174.46, '07', 1174.46, 63)
,(122, 3, 7820, 'CHICKEN-R-US INC', '001', PE CHICKEN-R-US 11191, 200, 'DUMMY CO *fake*, LLC', 1493196, 933702, '15-APR-19', '16-APR-19', 719.64, '07', 719.64, 60)
,(123, 1, 7835, 'KASHMIRWALA ENTERPRISES INC', '001', PE KASHMIRWALA 11222, 100, 'GI FOODS, LLC', 1492298, 932028, '09-APR-19', '09-APR-19', 1048.64, '07', 1048.64, 66)

想要(使用正则表达式查找/替换)...

,(96, 4, 7517, 'NEELAM FOODS INC', '001', 'PE NEELAM 10885 BEALETON', 100, 'GEORGES FOODS, LLC', 1492985, 933308, '12-APR-19', '15-APR-19', 639.68, '07', 639.68, 60)
,(97, 5, 7517, 'NEELAM FOODS INC', '001', 'PE NEELAM 10885 BEALETON', 100, 'GEORGES FOODS, LLC', 1493358, 934184, '16-APR-19', '17-APR-19', 475.38, '07', 475.38, 58)
,(115, 1, 7692, 'INDUS FOODS INC', '001', 'PE INDUS FOODS 11070', 100, 'GEORGES FOODS, LLC', 1492297, 932026, '09-APR-19', '09-APR-19', 804.18, '07', 804.18, 66)
,(116, 2, 7692, 'INDUS FOODS INC', '001', 'PE INDUS FOODS 11070', 100, 'GEORGES FOODS, LLC', 1492513, 932656, '10-APR-19', '11-APR-19', 724.22, '07', 724.22, 65)
,(117, 3, 7692, 'INDUS FOODS INC', '001', 'PE INDUS FOODS 11070', 100, 'GEORGES FOODS, LLC', 1492871, 933265, '12-APR-19', '13-APR-19', 1115.06, '07', 1115.06, 63)
,(118, 4, 7692, 'INDUS FOODS INC', '001', 'PE INDUS FOODS 11070', 100, 'GEORGES FOODS, LLC', 1493162, 933660, '15-APR-19', '16-APR-19', 843.08, '07', 843.08, 60)
,(120, 1, 7820, 'CHICKEN-R-US INC', '001', 'PE CHICKEN-R-US 11191', 200, 'DUMMY CO *fake*, LLC', 1492183, 932077, '08-APR-19', '09-APR-19', 599.7, '07', 599.7, 67)
,(121, 2, 7820, 'CHICKEN-R-US INC', '001', 'PE CHICKEN-R-US 11191', 200, 'DUMMY CO *fake*, LLC', 1492932, 933330, '12-APR-19', '13-APR-19', 1174.46, '07', 1174.46, 63)
,(122, 3, 7820, 'CHICKEN-R-US INC', '001', 'PE CHICKEN-R-US 11191', 200, 'DUMMY CO *fake*, LLC', 1493196, 933702, '15-APR-19', '16-APR-19', 719.64, '07', 719.64, 60)
,(123, 1, 7835, 'KASHMIRWALA ENTERPRISES INC', '001', 'PE KASHMIRWALA 11222', 100, 'GEORGES FOODS, LLC', 1492298, 932028, '09-APR-19', '09-APR-19', 1048.64, '07', 1048.64, 66)

0 个答案:

没有答案