Link to home
Start Free TrialLog in
Avatar of tmajor99
tmajor99

asked on

Regular Expression Help - finding string of certain length

I need help with a regular expression.  The following expression identifies strings of 4 bytes or more.  However, it does not seem to work when the string has a special character like "-".  

\w{4,}

For Example;

1234                       -->   Found.
23-44                     --> Not found

How can I get this to work with special characters?
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

[\w-]{4,}

HTH,
Dan
ASKER CERTIFIED SOLUTION
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tmajor99
tmajor99

ASKER

n/a