|
-
January 18th, 2011, 09:35 AM
#1
A Question Regarding Pattern Matching
Hello
I want to extract words from a string followed by a - .
for example in string : "sss-ddd-fff-" , i want the following groups :
1- "sss-"
2- "ddd-"
3- "fff-"
I wrote this regex for doing this : "((?:[^-]+)-)+"
But this isn't working as i said .
Could you explain what regex should i write for the mentioned task ? and what is the meaning of my
regex ?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|