Click here to Skip to main content
15,915,603 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: Regular expression for City name Pin
Richard Deeming8-Feb-24 3:38
mveRichard Deeming8-Feb-24 3:38 
You really are determined to ignore what you're being told, aren't you?! D'Oh! | :doh:

It is literally impossible to use a regex to determine whether a sequence of characters refers to a person, a city, a talking kangaroo, or a Vulcan mating ritual.

Your only hope is to get a massive database containing the name of every single city on Earth, and hope that anything that's not in that list refers to a person. And even that's not foolproof - for example, "Paris" could be a city or a person. Without more details, you have no way of knowing.

The data you're trying to process is garbage. If you need to be able to tell whether the data refers to a person or a city, then you need to go back to the people providing the data and get them to add something into the data to distinguish the two. Assuming they know the difference in the first place!



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

GeneralRe: Regular expression for City name Pin
Dave Kreskowiak8-Feb-24 3:56
mveDave Kreskowiak8-Feb-24 3:56 
GeneralRe: Regular expression for City name Pin
Richard MacCutchan8-Feb-24 4:36
mveRichard MacCutchan8-Feb-24 4:36 
JokeRe: Regular expression for City name Pin
jschell8-Feb-24 4:44
jschell8-Feb-24 4:44 
GeneralRe: Regular expression for City name Pin
Dave Kreskowiak8-Feb-24 3:55
mveDave Kreskowiak8-Feb-24 3:55 
AnswerRe: Regular expression for City name Pin
k50547-Feb-24 20:02
mvek50547-Feb-24 20:02 
AnswerRe: Regular expression for City name Pin
Pete O'Hanlon8-Feb-24 4:10
mvePete O'Hanlon8-Feb-24 4:10 
AnswerRe: Regular expression for City name Pin
jschell8-Feb-24 4:58
jschell8-Feb-24 4:58 
GeneralRe: Regular expression for City name Pin
Richard Deeming8-Feb-24 5:07
mveRichard Deeming8-Feb-24 5:07 
GeneralRe: Regular expression for City name Pin
jschell9-Feb-24 12:02
jschell9-Feb-24 12:02 
QuestionDoes anyone have experience with creating the regex rule for a fail2ban filter? Pin
Member 161948782-Feb-24 4:44
Member 161948782-Feb-24 4:44 
AnswerRe: Does anyone have experience with creating the regex rule for a fail2ban filter? Pin
jschell7-Feb-24 5:38
jschell7-Feb-24 5:38 
QuestionHelp for a regexp Pin
Member 1616830421-Dec-23 23:43
Member 1616830421-Dec-23 23:43 
AnswerRe: Help for a regexp Pin
Member 1616830422-Dec-23 2:53
Member 1616830422-Dec-23 2:53 
QuestionRegex: more than one identical character next to each other? Pin
Member 1615168129-Nov-23 7:07
Member 1615168129-Nov-23 7:07 
AnswerRe: Regex: more than one identical character next to each other? Pin
Richard Deeming29-Nov-23 22:28
mveRichard Deeming29-Nov-23 22:28 
QuestionHelp me regexp gurus please problem is matching files and copy Pin
Gin Mador11-Nov-23 15:27
Gin Mador11-Nov-23 15:27 
AnswerRe: Help me regexp gurus please problem is matching files and copy Pin
jschell30-Nov-23 6:17
jschell30-Nov-23 6:17 
Questionpattern replace with specific exception Pin
Member 1612263424-Oct-23 1:06
Member 1612263424-Oct-23 1:06 
AnswerRe: pattern replace with specific exception Pin
Member 1612263426-Oct-23 1:02
Member 1612263426-Oct-23 1:02 
AnswerRe: pattern replace with specific exception Pin
Justice Marc20-Nov-23 5:10
Justice Marc20-Nov-23 5:10 
QuestionReplacement of initial words Pin
Luca Smith12-Oct-23 0:47
Luca Smith12-Oct-23 0:47 
AnswerRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 0:50
mveOriginalGriff12-Oct-23 0:50 
GeneralRe: Replacement of initial words Pin
Luca Smith12-Oct-23 0:54
Luca Smith12-Oct-23 0:54 
GeneralRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 1:18
mveOriginalGriff12-Oct-23 1:18 

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.