Hi,
I am trying to create a regex that will match a sentence between two specific strings.
below is the sentence to match, the part I would like to match is marked in bold.
[[Text:hi this is a nice sentence[[very nice]] I like this text]] this is not related [[not]]
I have the following regex: \[\[Text:.*?]]
The problem is that it stops at the ]] after "very nice" and matches only: [[Text:hi this is a nice sentence[[very nice]]
Thanks anyone for any help.
Light Interactive.
Matching sentence between two strings
Moderator: General Moderators
- prometheuzz
- Forum Regular
- Posts: 779
- Joined: Fri Apr 04, 2008 5:51 am
Re: Matching sentence between two strings
When after some time you're not being answered in one place, I can imagine posting somewhere else. You however, cross posted this almost at the same time in at least one other forum, which is rather rude: people here could be wasting their time by answering you because you are already answered somewhere else:
http://regexadvice.com/forums/thread/45732.aspx
http://regexadvice.com/forums/thread/45732.aspx
Re: Matching sentence between two strings
Problem solved. Thanks.
- prometheuzz
- Forum Regular
- Posts: 779
- Joined: Fri Apr 04, 2008 5:51 am
Re: Matching sentence between two strings
Yes, I saw that. Next time, please provide a link to the other forum(s) you posted your question: people can then first check to see if you've been answered elsewhere before spending time on your question.lightInt wrote:Problem solved. Thanks.