10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00
QUESTDB_website/static/js/mhchemCE.js

17 lines
282 B
JavaScript
Raw Normal View History

2020-09-28 09:31:11 +02:00
class mhchemCE{
static extract(string) {
const m = string.match(mhchemCE.regEx)
if (m) {
return m[1]
} else {
return string
}
}
static test(string){
return mhchemCE.regEx.test(string)
}
static get regEx(){
return /^\\ce\{(.*)\}$/
}
}