regex
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
hello,
hope somebody can help me out it drives me goofy;
i need to make from (call: codenstuff) a url
even #CodenStuff send me to some regex websites but no idea why it don't work
i have to call: codenstuff at once.
so i want it to looks like this
i have to Call codenstuff at once
so the url contains: call: codenstuff
anyone please cryer;
hope somebody can help me out it drives me goofy;
i need to make from (call: codenstuff) a url
even #CodenStuff send me to some regex websites but no idea why it don't work
Code: Select all
dim ss = New Regex("\b(?<call>[a-zA-Z_0-9.-]+\w+)\b")
Code: Select all
i write: s = ss.Replace(s, "<a href=""${call}"" title=""Call me"" "">Call ${call}'here only the name without call:</a>")
i have to call: codenstuff at once.
so i want it to looks like this
i have to Call codenstuff at once
so the url contains: call: codenstuff
anyone please cryer;
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
?? whats the complete regex? #XTechVB
i tried:
i tried:
Code: Select all
but only showed callNew Regex("\b(?<call>\W\S*)\b")
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Dummy1912 wrote:?? whats the complete regex? #XTechVBJust a basic example
i tried:Code: Select allbut only showed callNew Regex("\b(?<call>\W\S*)\b")
Code: Select all
Dim Rgx As Regex = New Regex("call:?\W\S*")
For Each RgMatch As Match In Rgx.Matches(TextBox1.Text)
MessageBox.Show(RgMatch.Value)
Next
You can find me on Facebook or on Skype mihai_92b
can you make it work like my own example #XTechVB
because its all in 1 sub
so i don't need to use if s.contains("call") then
if you get me
because its all in 1 sub

so i don't need to use if s.contains("call") then
if you get me

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
ok but still
i need to use
i need to use
Code: Select all
s = ss.Replace(s, "<a href=""${call}"" title=""Call me"" "">Call ${call}'here only the name without call:</a>")
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Well this example works fine
Code: Select all
Dim Rgx As Regex = New Regex("call:?\W\S*")
For Each RgMatch As Match In Rgx.Matches(TextBox1.Text)
Dim FoundCall As String = RgMatch.Value.Substring(5, RgMatch.Value.Length - 5)
TextBox1.Text = TextBox1.Text.Replace(RgMatch.Value, "<a href=" + """" + FoundCall + """" + " title=""Call me"" "">Call " + FoundCall + "</a>")
Next
You can find me on Facebook or on Skype mihai_92b
#XTechVB
its not working :(
its not working :(
You do not have the required permissions to view the files attached to this post.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
thanks for the demo works fine at some minus parts 
if you can do what i PMed you
then ill try to see where my problem stuck

if you can do what i PMed you
then ill try to see where my problem stuck

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Copyright Information
Copyright © Codenstuff.com 2020 - 2023