1. #1
    Europa's Avatar
    Registered
    29/09/10
    Location
    Kortrijk
    Posts
    240
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/3

    Vraagje reguliere expressies

    Hoi!

    Er is een klein iets die ik niet versta in volgend patroon:

    String ptrnFinancieel="-{0,1}[0-9]+\\.[0-9]{2}[0-9]*Û";


    Het is de "\\" on geveer in het midden van de code. Weet iemand voor wat het staat? Het gaat om te testen of de waarde een financiële waarde is. De rest snap ik .

    Alvast bedankt!
    no votes   Reply With Quote Reply With Quote

  2. #2
    Cycloon's Avatar
    Registered
    18/01/04
    Location
    Melle
    Posts
    10,535
    iTrader
    56 (100%)
    Mentioned
    0 Post(s)
    Reputation
    27/102
    De "\\" betekent dat je expliciet op het \-teken wil controleren. Een enkele backslash betekent dat je iets gaat escapen (wat neerkomt op het aangeven dat je een letterlijk teken wil aangeven). Omdat de backslash op zich een systematische betekenis heeft moet je die dus escapen als je die letterlijk wil controleren.
    “In terms of how we evaluate schooling, everything is about working by yourself. If you work with someone else, it’s called cheating. Once you get out in the real world, everything you do involves working with other people.”
    PSN: Cycloon - Final Fantasy XIV: A realm reborn character
    no votes   Reply With Quote Reply With Quote

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in