how can I “clean” strings from everything that starts with GH
until -
mark, I need just the rest of the data, the problem is that I don’t know what number will be part of GHxxx-
, in the example, it can be anything.
Is there a way in regex to define something like this?
GH82-30476E/30477E
GH82-23124B GH82-23100B
GH82-20900A, GH82-20838A
GH82-20900C,GH82-20838C
GH962-13566A
GH82-23596C/23597C/31461C
desired result:
30476E 30477E
23124B 23100B
20900A 20838A
20900C 20838C
13566A
23596C 23597C 31461C
const arr = ["GH82-30476E/30477E", "GH82-23124B GH82-23100B", "GH82-20900A, GH82-20838A", "GH82-20900C,GH82-20838C", "GH962-13566A", "GH82-23596C/23597C/31461C"]
arr.forEach((e, index) => {
arr[index] = e.replaceAll("GH81-", "")
console.log(e)
})
Than you in advance.