Regex for selecting text area contents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sneha p
    New Member
    • Apr 2014
    • 1

    Regex for selecting text area contents

    Hey i want regexp in java script to select all the contents of text area .I want to implement this through voice commands.As soon i say select all command it should select all the contents of text area.

    Code:
    function selectall(s)
    {
    return s.match(/[a-zA-Z]+/g);
    }
    but this function is not highlighting anything. How to do this??
    Last edited by gits; Apr 16 '14, 10:08 AM. Reason: added code tags
Working...