Forum Discussion
Sam_Pickles_110
Nimbostratus
Jun 10, 2013stream expression regex "-" character
hi devcentral gurus;
I am looking to match a regular expression against a filename, which may contain a-z, A-Z, 0-9, _,-, characters before the dot.extension.
My regex works great for all...
hoolio
Cirrostratus
Jun 10, 2013Hey Sam,
You shouldn't need to escape characters in a character class. The hyphen needs to be the first or last character in a character class so it's not interpreted as part of a character range. Here's a related article: http://www.regular-expressions.info/posixbrackets.html
Can you try this?
STREAM::expression {@filename="[\w-]{1,200}\.[a-zA-Z0-9]{1,10}"@something@}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects