• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Regular Expressions and Special Characters"

Collapse

  • Fishface
    replied
    Originally posted by TheFaQQer View Post
    ... The business have said that if the character is the same without any accent, then that's OK by them - so if one system says "n" and the other says "ñ" then they want that to match.

    So, I was hoping to do a regular expression replace on the text in both tables to replace "ñ" with "n" in both systems, and the same for a,e,i,o,u etc. etc.

    Apart from going through a character map, does anyone know of a regular expression syntax that I can use to do the replacement?

    Careful, año and ano do not match.

    E.g that guy in the business is a real ano.

    2014 is going to be a great año

    Leave a comment:


  • rashm2k
    replied
    Try this stackoverflow q

    How do I remove diacritics (accents) from a string in .NET? - Stack Overflow

    Leave a comment:


  • Bunk
    replied
    Originally posted by Sysman View Post
    FTFY


    It doesn't. The ajax request goes to h ttp://forums.contractoruk.com/thanks.php

    Edit: Ah, you mean they're loading jQuery from the CDN.
    Last edited by Bunk; 25 July 2014, 09:46.

    Leave a comment:


  • Sysman
    replied
    Originally posted by TheFaQQer View Post
    Thanks
    Originally posted by mudskipper View Post
    We should have a button that doesn't need ajax.googleapis.com for that....
    FTFY

    Leave a comment:


  • TheFaQQer
    replied
    Originally posted by mudskipper View Post
    ... although a pint would be equally acceptable.
    It wasn't THAT helpful

    Have a instead.

    Leave a comment:


  • mudskipper
    replied
    Originally posted by mudskipper View Post
    We should have a button for that....
    ... although a pint would be equally acceptable.

    Leave a comment:


  • mudskipper
    replied
    Originally posted by TheFaQQer View Post
    Thanks
    We should have a button for that....

    Leave a comment:


  • TheFaQQer
    replied
    Originally posted by mudskipper View Post
    Thanks - there's some things in there that I might need to plug into my code.

    Leave a comment:


  • TheFaQQer
    replied
    Originally posted by rashm2k View Post
    Would in not be better to find all the accented letters? And replace those or add them to your regex

    A simple regex will do that.
    That's one way to do it, but I was wondering if there was a standard way to do it - for example, Oracle has a [:punct:] option which will remove all punctuation.

    At the moment, I've gone looking for special characters, but since we are multi-muilti-lingual, there are lots of characters that I could expect, and if I've missed one then I'll need to make more changes to add in extra characters.

    Leave a comment:


  • DaveB
    replied
    If you're using (or could use) an up to date build of PERL you can use Unicode::Normalize to do it for you

    Unicode::Normalize - perldoc.perl.org

    In fact any language that explicitly supports Unicode should have a Normalization module available
    Last edited by DaveB; 24 July 2014, 08:49.

    Leave a comment:


  • mudskipper
    replied
    Is this Oracle?

    Linguistic Sorting and String Searching

    Leave a comment:


  • mudskipper
    replied
    What language are you using? The term you need to google is diacritics.

    Leave a comment:


  • rashm2k
    replied
    Would in not be better to find all the accented letters? And replace those or add them to your regex

    A simple regex will do that.

    Leave a comment:


  • TheFaQQer
    started a topic Regular Expressions and Special Characters

    Regular Expressions and Special Characters

    Does anyone know of an easy way to use regular expressions to replace special characters?

    I'm trying to compare data from two tables to see where there are discrepancies, but a lot of them contain special characters. The business have said that if the character is the same without any accent, then that's OK by them - so if one system says "n" and the other says "ñ" then they want that to match.

    So, I was hoping to do a regular expression replace on the text in both tables to replace "ñ" with "n" in both systems, and the same for a,e,i,o,u etc. etc.

    Apart from going through a character map, does anyone know of a regular expression syntax that I can use to do the replacement?

Working...
X