Click here to Skip to main content
15,881,812 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 2:49
murdocklawless4-Nov-21 2:49 
AnswerRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Peter_in_27804-Nov-21 3:17
professionalPeter_in_27804-Nov-21 3:17 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 3:31
murdocklawless4-Nov-21 3:31 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
Peter_in_27804-Nov-21 12:05
professionalPeter_in_27804-Nov-21 12:05 
GeneralRe: fail2ban regex matching on testing sites but not fail2ban itself Pin
murdocklawless4-Nov-21 13:10
murdocklawless4-Nov-21 13:10 
QuestionEditing my existing Regex Pin
Member 154173673-Nov-21 1:14
Member 154173673-Nov-21 1:14 
Questionregex to replace accents Pin
Member 1489067816-Sep-21 3:50
Member 1489067816-Sep-21 3:50 
AnswerRe: regex to replace accents Pin
Richard Deeming16-Sep-21 4:28
mveRichard Deeming16-Sep-21 4:28 
Why would you use a Regex for something so simple?
C#
bool replacedAny = false;
char[] characters = Texto_Retorno.ToCharArray();
for (int index = 0; index < characters.Length; index++)
{
    switch (characters[index])
    {
        case 'á':
        case 'à':
        case 'ä':
        case 'â':
        {
            characters[index] = 'a';
            replacedAny = true;
            break;
        }
        case 'é':
        case 'è':
        case 'ë':
        case 'ê':
        {
            characters[index] = 'e';
            replacedAny = true;
            break;
        }
        case 'í':
        case 'ì':
        case 'ï':
        case 'î':
        {
            characters[index] = 'i';
            replacedAny = true;
            break;
        }
        case 'ó':
        case 'ò':
        case 'ö':
        case 'ô':
        {
            characters[index] = 'o';
            replacedAny = true;
            break;
        }
        case 'ú':
        case 'ù':
        case 'ü':
        case 'û':
        {
            characters[index] = 'u';
            replacedAny = true;
            break;
        }
    }
}

if (replacedAny)
{
    Texto_Retorno = new string(characters);
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


modified 16-Sep-21 10:54am.

GeneralRe: regex to replace accents Pin
Richard MacCutchan16-Sep-21 4:44
mveRichard MacCutchan16-Sep-21 4:44 
GeneralRe: regex to replace accents Pin
Richard Deeming16-Sep-21 4:55
mveRichard Deeming16-Sep-21 4:55 
GeneralRe: regex to replace accents Pin
Richard MacCutchan16-Sep-21 5:05
mveRichard MacCutchan16-Sep-21 5:05 
GeneralRe: regex to replace accents Pin
Member 1489067816-Sep-21 5:38
Member 1489067816-Sep-21 5:38 
GeneralRe: regex to replace accents Pin
Richard Deeming16-Sep-21 5:54
mveRichard Deeming16-Sep-21 5:54 
GeneralRe: regex to replace accents Pin
Member 1489067816-Sep-21 5:39
Member 1489067816-Sep-21 5:39 
AnswerRe: regex to replace accents Pin
Peter_in_278016-Sep-21 4:45
professionalPeter_in_278016-Sep-21 4:45 
QuestionRegex Match with Multiple Words, I need you to not use leading and trailing spaces. Pin
Member 1489067816-Sep-21 3:07
Member 1489067816-Sep-21 3:07 
QuestionTrying to match a string with many backslashes Pin
Florian Rammler31-Aug-21 1:35
Florian Rammler31-Aug-21 1:35 
AnswerRe: Trying to match a string with many backslashes Pin
Richard Deeming31-Aug-21 2:55
mveRichard Deeming31-Aug-21 2:55 
QuestionRegex to match exact word and dash symbol Pin
Member 1533502224-Aug-21 9:28
Member 1533502224-Aug-21 9:28 
AnswerRe: Regex to match exact word and dash symbol Pin
OriginalGriff24-Aug-21 9:32
mveOriginalGriff24-Aug-21 9:32 
GeneralRe: Regex to match exact word and dash symbol Pin
Member 1533502224-Aug-21 10:00
Member 1533502224-Aug-21 10:00 
AnswerRe: Regex to match exact word and dash symbol Pin
User 1521787324-Aug-21 17:47
User 1521787324-Aug-21 17:47 
GeneralRe: Regex to match exact word and dash symbol Pin
Member 1533502224-Aug-21 22:57
Member 1533502224-Aug-21 22:57 
GeneralRe: Regex to match exact word and dash symbol Pin
User 1521787324-Aug-21 23:32
User 1521787324-Aug-21 23:32 
GeneralRe: Regex to match exact word and dash symbol Pin
Member 1533502224-Aug-21 23:37
Member 1533502224-Aug-21 23:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.