Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
Complicated Regular expression scenario.
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Deer Park
12y
1.7k
1
Reply
So, I have a input string which has html styles data. The end goal is to locate the tag - "#TAG#0.00-0##0#[ ]". There could be multiple of these tags on the input string.
Once these tags are located, it needs to be replaced with static text with little tweak.
So, if the input string is -
"This is sample string #TAG#0.00-0##0#[ ] (a) this is another sample string. This is third sample string #TAG#0.00-0##0#[ This is a text] Another sample string."
The output string should look like -
"This is sample string <tag id = "#TAG#0.00-0##0#">[ ] </tag> (a) this is another sample string. This is third sample string <tag id = "#TAG#0.00-0##0#">[ This is a text] Another sample string "
How can this be done using regular expression or any other mechanism. Any hint would be highly appreciated.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Difference between Format and Unformated data control in Asp.net
Response.Redirect Vs Server.Transfer