bigskysoftware / bigskysoftware/_hyperscript

Regex syntax

Open
#604 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

I want to sanitize the input value, I made this work:

```
js
const regex = /[^a-zA-Z0-9-]/g
return {regex}
end

on input
set my value to my value.replace(regex, '')
end

```

I was wondering how can I avoid having to define the regex in JS and put it directly in HS, I didn't find any reference on RegExp on the documentation

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.