Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-05-16 12:16
Flavor·PCRE (Legacy)

/
(^[\d]+[\.]{0,1}[\d]*%$)
/
Open regex in editor

Description

This regex checks if a string contains a number that ends with a "%" character ignoring all other cases. 96% -> accept 96.6% -> accept kk% -> Reject 96%% -> Reject

Submitted by Krishna