Regex To Match The First X Characters In A Sentence

Category: Strings | Views Total: 9 views

A useful Regex that matches the first X (30 in the example below) characters (including space) in a sentence.

/^([\s\S]){1,20}([\s\.])/

Matches:

  • A useful Regext that matches the first X (30 in the example below) characters (including space) in a sentence.

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply