New topic: 

regex escape dot question

<http://forums.realsoftware.com/viewtopic.php?t=30627>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       Dralion           Post subject: regex escape dot questionPosted: 
Fri Oct 23, 2009 6:19 pm                        
Joined: Sat Mar 15, 2008 8:14 am
Posts: 118
Location: Montreal, Quebec, Canada              I everybody
i try to escape the dot contains in editfield string and compare to listbox 
cell string
im not sure for theCode:rg.SearchPattern= "\b\." + efdb1.Text + "\b" result no 
error
But for Code:myMatch=rg.search "\b"+ (lbcompare.Cell(zz,0)) + "\b" Give me 
syntax error
Could you please check both of my escape sentence and help me
Thanks

Code:Dim c,d,zx,zy,z,y as Integer
Dim rg as New RegEx

y = lbResult1.ListCount
y=y-1

for yy as Integer = 0 to y // ------------------------------------------------ 
loop source
  efdb1.text = (lbResult1.cell(yy,0))
  
  rg.options.CaseSensitive=True
  rg.SearchPattern= "\b\." + efdb1.Text + "\b"
  
  
  z = lbcompare.ListCount
  z = z -1
  
  for zz as integer = 0 to z  //----------------------------------- loop compare
  efdbc.Text = (lbcompare.Cell(zz,0))
  myMatch=rg.search "\b"+ (lbcompare.Cell(zz,0)) + "\b"
  
  
  if c = d then  //------------ match
  if myMatch <> Nil then
    StaticText1.text=myMatch.SubExpressionString(0)
    MsgBox("OK trouvé")
    uprec  //----------------------------------------------------UPDATE DB
  End if
  else
  StaticText1.text="Text not found!"
  end if
  
  next  //-------------------------------------------------------- FIN loop 
compare
  
next // 
------------------------------------------------------------------------------FIN
 loop source

     
_________________
--------------------
RB 2009r3 on winXP Sp2  
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to