Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to combine two regular expressions in javascript

var one = /[a-z]/;
var two = /[A-Z]/;

var one_or_two = new RegExp("(" + one.source + ")|(" + two.source + ")")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #combine #regular #expressions #javascript
ADD COMMENT
Topic
Name
8+2 =