Question
I have a file in the following format:
Data Data Data [Start] Data i want [End] Data
I'd like to grab the Data i want from between the [Start] and [End] tags using a RegEx. Can anyone show me how this might be done?
Answer
\[start\]\s*(((?!\[start\]|\[end\]).)+)\s*\[end\]
This should hopefully drop the [start] and [end] markers as well.
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/1237/" >Regex: To pull out a sub-string between two tags in a string< /a>
0 comments:
Post a Comment