Skip to main content
added 272 characters in body
Source Link

I have made an example with your regex that catches special chars which you can find herehere

As i said im using your regex by modifying it as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\w+[ ]?\w+[ ]?\w+:. 

if you would like to also exclude digits you can modify it as such:

[AP]M[^a-zA-Z\d]-[^a-zA-Z\d]\w+[ ]?\w+[ ]?\w+:. 

Also if you are expecting special characters in the name you can use \S instead of \w, this will include everything but white space chars. Then the regex will be as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\S+[ ]?\S+[ ]?\S+:. 

i have updated the Regex101 example.

I have made an example with your regex that catches special chars which you can find here

As i said im using your regex by modifying it as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\w+[ ]?\w+[ ]?\w+:. 

if you would like to also exclude digits you can modify it as such:

[AP]M[^a-zA-Z\d]-[^a-zA-Z\d]\w+[ ]?\w+[ ]?\w+:. 

I have made an example with your regex that catches special chars which you can find here

As i said im using your regex by modifying it as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\w+[ ]?\w+[ ]?\w+:. 

if you would like to also exclude digits you can modify it as such:

[AP]M[^a-zA-Z\d]-[^a-zA-Z\d]\w+[ ]?\w+[ ]?\w+:. 

Also if you are expecting special characters in the name you can use \S instead of \w, this will include everything but white space chars. Then the regex will be as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\S+[ ]?\S+[ ]?\S+:. 

i have updated the Regex101 example.

Source Link

I have made an example with your regex that catches special chars which you can find here

As i said im using your regex by modifying it as such:

[AP]M[^a-zA-Z]-[^a-zA-Z]\w+[ ]?\w+[ ]?\w+:. 

if you would like to also exclude digits you can modify it as such:

[AP]M[^a-zA-Z\d]-[^a-zA-Z\d]\w+[ ]?\w+[ ]?\w+:.