Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

file extension regex javascript

[
  "foobar.a",
  "foobar.txt",
  "foobar.foobar1234"
].forEach( t => 
  console.log(
    t.match(/.[0-9a-z]+$/i)[0]
  ) 
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #extension #regex #javascript
ADD COMMENT
Topic
Name
7+7 =