Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi,

I am using a regular expression for getting a specific format from a string.

Below is the string.
javascript:__doPostBack('ctl00$MainContent$TreeView1','sC:*|*\\C:*|**|*Backup Files*|*\\C:*|**|*Backup Files*|**|*Solution1*|*')

From the above string i want to fetch Only C:*|**|*Backup Files*|**|*Solution1*|* part. How to do this. I have tried this in my way.

mystr.match(/\w{1}[:][*][|][*][*][|][*][a-z A-Z 0-9\s*|]*/)

Through this method i am getting only the C:*|**|*Backup Files*|* part.

Please Help
Posted
Comments
I.explore.code 11-Oct-12 15:06pm    
You are quite close to solving your own problem. Here is a bit of help to help you test your regex and keep modifying it until you get it right:
Regex Validator

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900