Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI CodeMyUI/index.html

Created Nov 1, 2019
What would you like to do?
Regex test on <input> value with reproCSS
<h1>Regex on input value</h1>
<input id=demo>
<p>This input will go red when the regular expression <code>/magic/gi</code> is met. So it should light up for any values that contain 'MAGIC' or 'magic'</p>
<style process="load input">
${/magic/gi.test(demo.value) && '#demo'} {
background: red;
<footer>Built with <a href=>reproCSS</a> </footer>
<script src=""></script>
input {
padding: .25em;
width: 100%;
font-size: 14pt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.