当前位置:网站首页>Write a regular
Write a regular
2022-04-23 17:40:00 【Lost Camel】
demand :
character string : Stock code :002354, Shares referred to as" :*ST Tianyu , Number :2020--119, Bond code :112496, Bond abbreviation :17 Celestial spirit 01, Dalian Tianshen Entertainment Co., Ltd , About “17 Celestial spirit 01" Delisting announcement ,
Required string : Dalian Tianshen Entertainment Co., Ltd
const str = ' Stock code :002354, Shares referred to as" :*ST Tianyu , Number :2020--119, Bond code :112496, Bond abbreviation :17 Celestial spirit 01, Dalian Tianshen Entertainment Co., Ltd , About “17 Celestial spirit 01" Delisting announcement ,'
const info = str.split(/(?<=[:][^,]+),(?=[^,]+[:])/g).map(m=>({ key:m.split(':')[0],value:m.split(':')[1] }))
const compJJ = info.find(m=>m.key ===' Bond abbreviation ')
const compName = compJJ ? compJJ.value.split(',')[1] : ''
console.log(info,compJJ,compName)
// compName To get the company name
版权声明
本文为[Lost Camel]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230552420605.html
边栏推荐
猜你喜欢
Simulation of infrared wireless communication based on 51 single chip microcomputer
2021长城杯WP
Learning record of uni app dark horse yougou project (Part 2)
Using quartz under. Net core - [1] quick start
48. 旋转图像
uni-app黑马优购项目学习记录(下)
1217_ Generating target files using scons
Double pointer advanced -- leetcode title -- container with the most water
[ES6] promise related (event loop, macro / micro task, promise, await / await)
470. Rand10() is implemented with rand7()
随机推荐
Future usage details
Using quartz under. Net core -- a simple trigger of [7] operation and trigger
[ES6] promise related (event loop, macro / micro task, promise, await / await)
402. 移掉 K 位数字-贪心
PC电脑使用无线网卡连接上手机热点,为什么不能上网
Using quartz under. Net core -- job attributes and exceptions of [4] jobs and triggers
The system cannot be started after AHCI is enabled
Some questions some questions some questions some questions
ASP. NET CORE3. 1. Solution to login failure after identity registers users
958. Complete binary tree test
索引:手把手教你索引从零基础到精通使用
How to manually implement the mechanism of triggering garbage collection in node
Shell - introduction, variables, and basic syntax
剑指 Offer 03. 数组中重复的数字
Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger
Use of shell sed command
Sword finger offer 22 The penultimate node in the linked list - speed pointer
uni-app黑马优购项目学习记录(下)
209. 长度最小的子数组-滑动窗口
2.Electron之HelloWorld