Am 12.06.2010 um 13:11 schrieb Robert Lehner:

> Hallo,
> 
> wie sucht man einen 4-stelligen hexadezimalen Wert?

Also das hier funktionier schon einmal:

  dim r as RegExMbs
  dim s as string
  dim c as integer
  
  s="123 äöü ABC 456"
  
  r=new RegExMBS
  if r.Compile(".ö.") then
    c=r.Execute(s,0)
    MsgBox str(c)+" "+str(r.Offset(0))+" "+str(r.Offset(1))
    // shows: 1 4 10
    // 1 for ubound of the offset array
    // 4 for 4 bytes before the matched pattern
    // 10 for the 10 bytes before the end of the matched pattern
  end if
  
  r=new RegExMBS
  if r.Compile(".\xF6.") then // finds ö using Unicode codepoint
    c=r.Execute(s,0)
    MsgBox str(c)+" "+str(r.Offset(0))+" "+str(r.Offset(1))
    // shows: 1 4 10
    // 1 for ubound of the offset array
    // 4 for 4 bytes before the matched pattern
    // 10 for the 10 bytes before the end of the matched pattern
  end if
  
  

Gruß
Christian

-- 
Neuigkeiten zu unseren Plugins finden Sie bei uns im Blog:

http://www.mbsplugins.de/


Antwort per Email an