Simple explanation of Regex?

Is there a simple explanation of how to create Regex find and replace patterns?
I need to convert Czech dates like 31. října 1967 to 31 October 1967 and that kind of thing. I know it should be easy, and I have just about figure out how to actually find expressions, but not how to replace them. I would love to find some kind of resource that would teach Regex to a complete newbie with zero knowlege of programming rather than having to ask people to come up with solutions for me.

Parents Reply
  • Ah, that's the "plugin" option I was mentioning! So you are referring to Regex match Autosuggest provider the whole time! That's a completely different story... you should have mentioned that right at the beginning...

    In that case it's just the regex you got wrong - you missed the "\d" which means "digit", and you got the wrong brackets; different types of brackets have completely different meanings in regexes!

    Then it should be something like (it's better to define the spaces as optional, unless you are absolutely sure that they are always there):

    (\d{1,2})\.\s*(#czech_months#)\s*(\d{4})

    and the replace pattern would be the same as your original one:

    $1 $2 $3

    Still, unless your replacement table contains correct pairs for all inflected variations of Czech month names (or unless there are no inflected names in your text), I guess you might have a problem...

Children