I currently have the following code in VB .Net:
Dim matchcollection As System.Text.RegularExpressions.MatchCollection Dim currentmatch As System.Text.RegularExpressions.Match Dim lowercasetag As String matchcollection = Regex.Matches(lines, "\[(?i)(.+?)\]") For Each currentmatch In matchcollection lowercasetag = currentmatch.ToString.ToLower lines = Regex.Replace(lines, "\[(?i)(.+?)\]", "[" & lowercasetag & "]") Next
The variable lines comes in as a string. The Regex is supposed to detect BBCode tags regardless of case (which is does perfectly) and then drop the case down to lower case.
However, it seems that the lowercasetag variable cannot be understood by regex. I was wondering whether I was doing something wrong, or if there were an alternative way of doing this.
Thanks again!
This post has been edited by aommaster: 24 June 2009 - 08:10 AM

Help
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.




Back to top











