vb.net - How to remove letters? -


i wanna ask: have label40.text content of {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} , have have label39.text change output everytime changes happens.

my question how can embed simulation through code?

if label39.text = "a" content of label40.text "a" remove , list of alphabets remain alphabetically.

i want happen anytime label39.text change value "randomly"

example if label39.text = "a,b,c,d,x,z" label40.text = "e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y"

this code far

dim patterns string         patterns = label39.text         dim tobefollow string         tobefollow = label40.text         dim matches matchcollection = regex.matches(patterns, tobefollow)         if regex.ismatch(patterns, tobefollow)                'this put code make example          end if 

first of all, note populating patterns , tobefollow variables wrongly (you doing right in other question); should be:

patterns = label40.text tobefollow = label39.text 

also bear in mind want can accomplished without relying on regex; example via:

if (label40.text.tolower().contains(label39.text.tolower()))        'this put code make example  end if 

regarding want time, can rely on .replace: .replace("text deleted", "") remove letter; have account commas. code put inside condition:

dim origstring string = label40.text label40.text = label40.text.tolower().replace(label39.text.tolower() & ",", "") if (origstring = label40.text)     'it means not have comma, is, refers last letter     label40.text = label40.text.tolower().replace("," & label39.text.tolower(), "") end if 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -