Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey how to write regular expression to select the contents of textarea(i need to select all the contents in one click)

document.getElementById('text').focus();
document.getElementById('text').select();

Have tried this...but want to write the same thing using regular expression
Posted

1 solution

Hi,

A regular express lets you to validate some text/value as per expression. But the thing you wants to do can be done as you already did or use jquery.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900