Itai Assaf Greif
Itai Assaf Greif

Reputation: 31

How do I catch non-regular characters in regal regex?

I'm trying to catch this block of text using regal regular expression:

¡¾Ìá¡¿#/¡¾¹©¡¿/¸÷/ÐÐ/Òµ/¡¾°l¡¿*/¡¾Æ±¡¿¡£ µç»°13534018113ÕÅÉú ¾´Çë±£Áô•½±ãÁªÏµ

I used [^a-zA-Z]+ which I expect should cover new line character and white spaces. This is not the case. I don't know why. Is there a special character that is covered by a-z or A-Z?

Upvotes: 3

Views: 112

Answers (1)

Firas Dib
Firas Dib

Reputation: 2621

You need to use the single line modifier with whatever language you're using. Add a tag next time.

Here's a working regular expression for PCRE: /[^a-z]+/gis

Demo+explanation: http://regex101.com/r/pA4dG2

Upvotes: 1

Related Questions