Sorgu için arama sonuçları: RegExp

  1. H

    Parantez içi rakamları toplu değiştir

    Olası bir sonraki soru için; Eğer nokta veya virgül kimisinde var, kimisinde yoksa bütün parantez ve içlerindeki nümerik değerlerde bu işi yapmak için; regExp.Pattern = "\(\d*[.,]?\d+?\)" .
  2. H

    Parantez içi rakamları toplu değiştir

    Necdet Bey, Nokta veya virgül varsa; regExp.Pattern = "\(\d+[.,]\d+\)" .
  3. asdsxx

    Parantez içi rakamları toplu değiştir

    Haluk Bey çok teşekkür ederim. istediğim bu idi. Eline sağlık Kod'a biçimlendirmeyi koyu(Kalın) olacak şekilde bir satır ekleyebilirmiyiz.
  4. H

    Parantez içi rakamları toplu değiştir

    Aşağıdaki kod, isteğinizi karşılar... Sub Test() ' Haluk - 22/03/2024 ' sa4truss@gmail.com Dim regExp As Object, myRange As Range Set regExp = CreateObject("VBscript.RegExp") regExp.Pattern = "\(\d+\)" regExp.Global = True For Each Match In...
  5. H

    Döviz ve altın kurları indirme

    ...objHTTP.Open "GET", strURL, False objHTTP.send HTMLcode = objHTTP.responseText Set regExp = CreateObject("VBScript.RegExp") regExp.ignorecase = True regExp.Global = True regExp.Pattern = """BuyRate"":""(.+?)"",""SellRate"":""(.+?)"""...
  6. veyselemre

    Hücreden sadece Harf olanları başka hücreye yazdırma

    ...If WorksheetFunction.CountA(rng) = 0 Then Exit Sub Set rng = rng.SpecialCells(xlCellTypeConstants) With CreateObject("VBScript.RegExp") .Pattern = "\d" .Global = True .IgnoreCase = True For Each r In rng If .test(r.Value) Then r.Offset(...
  7. hüseyintok

    Hücreden sadece Harf olanları başka hücreye yazdırma

    Hocam teşekkürler. çalışıyor ama tablo çok uzun olduğu için çok uzun süre bekletiyor. daha kısa yolu yokmudur?
  8. E

    Hücreden sadece Harf olanları başka hücreye yazdırma

    ...As String) As String Dim result As String, objRegEx As Object, match As Object Set objRegEx = CreateObject("vbscript.regexp") objRegEx.Pattern = "[a-zA-Z]+" objRegEx.Global = True objRegEx.IgnoreCase = True If objRegEx.test(str) Then Set match =...
  9. H

    Çözüldü Sin(x)° değiştir x,xxx

    Sözkonusu ifade eğer A1 hücresindeyse, aşağıdaki "REGEXP" kodu işinizi görecektir; Sub Test() 'Haluk - 20/01/2024 Dim objRegEx As Object, RetVal As Object, temp As String, myStr As String Set objRegEx = CreateObject("VBscript.RegExp") objRegEx.Global = True...
  10. E

    Metin İçerisinden Sayı Alma

    Çok teşekkür ederim emeğinize sağlık kalpkalpkalp
  11. ÖmerBey

    Metin İçerisinden Sayı Alma

    Bir de bunu deneyiniz. Sub tcnoyual() Set nesne = CreateObject("VBScript.Regexp") nesne.Global = True nesne.Pattern = "\D(\d{11})\D" For a = 2 To [I65536].End(3).Row Set veri = nesne.Execute(Cells(a, "I")) If veri.Count > 0 Then Cells(a, "j") = Mid(nesne.Execute(Cells(a, "I")).Item(0), 2, 11)...
  12. E

    Metin İçerisinden Sayı Alma

    Sayın hocam t.c. kimlik numaralarının başında karakter olduğu zaman almıyor boşluk varsa alıyor da t.c.:111, -111...- şeklimde olanları almıyor bir çözümü var mıdır
  13. veyselemre

    rakam ve alfabeden oluşan hücreyi belli bir düzende ayırma

    Sub test() Range("B:Z").ClearContents Dim huc As Range, m As Object, sut With CreateObject("VBScript.RegExp") .Pattern = "[\d]+|[^\d]+" .Global = True For Each huc In Range("A1:A" & Cells(Rows.Count, 1).End(3).Row) If .test(huc.Value) Then...
  14. E

    Hücre içerisindeki kelimeden başka hücreye veri çekme

    ...Function VirguldenAl(metin As String, sira As Integer) As String Dim parcalar() As String Set r = CreateObject("VBScript.RegExp") sPattern = "\d+" r.Pattern = sPattern parcalar = Split(metin, ",") If sira >= 1 And sira <= UBound(parcalar) + 2 Then...
  15. ÖmerFaruk

    Textbox a sadece geçerli saat ve dakika girilebilsin

    ...If Len(Me.TextBox1) = 2 And Right(Me.TextBox1, 1) = ":" Then Me.TextBox1 = "0" & Me.TextBox1: Exit Sub Set nesne = CreateObject("VBScript.Regexp") Select Case Len(TextBox1) Case 1: nesne.Pattern = "^[0-9]" Case 2: nesne.Pattern = "^(0[0-9]|1[0-9]|2[0-3])$" Case...
  16. E

    Metinin önünde ve sonundaki noktalama işaretlerini temizlemek

    ...İsterseniz kodda döngüde kullanın. Function Temizle(alan As Range) Dim regEx As Object Dim str As String Set regEx = CreateObject("VBScript.RegExp") With regEx .Global = True .IgnoreCase = True .Pattern = "^\W{1,999}|\W{1,999}$" End With Temizle = regEx.Replace(alan.Value...
  17. H

    hücredeki boşluk

    fonksiyon olarak nasıl kullanacağım bilemedim hocam
  18. E

    hücredeki boşluk

    Fonksiyonu kullanabilirsiniz. Function RemoveWhiteSpace(target As String) As String With CreateObject("VBScript.RegExp") .Pattern = "\s" .MultiLine = True .Global = True RemoveWhiteSpace = .Replace(target, vbNullString) End With End Function
  19. H

    Çözüldü Harf Arası Birer Boşluk Bırakma

    RegExp ile alternatif; Function AddSpace(myRange As Range) As String ' Haluk - 16/11/2023 Dim regExp As Object Set regExp = CreateObject("VBScript.RegExp") regExp.IgnoreCase = True regExp.Global = True regExp.Pattern = "(.)" AddSpace =...
Üst