Regex: Find out what tags does not contain english characters (ansii/utf-8)
-
hello. I have this kind of html tags:
<title>I love cars | My name (am) </title><title>የማይታይ እሳት በታላቅነት ከተያዘ ነፍስ | My name (am) </title>Find out what tags does not contain english characters (ansii)
The output (after the FIND, should be the line 2)
<title>የማይታይ እሳት በታላቅነት ከተያዘ ነፍስ | My name (am) </title>how can I do this, please?
-
This post is deleted! -
This post is deleted! -
Hello, @robin-cruise and All,
The regex, below, searches for any range
<title> •••••• </title>if, at least, one character, between<title>and</title>, has a code-point overx{007F}SEARCH
(?s-i)<title>(?=.*?[^\x00-\x7f].*?</title>).+?</title>The positive look-ahead
(?=.*?[^\x00-\x7f].*?</title>), after the opening<title>tag, looks for a char, over\x7F, located, further on, and before an ending</title>tagBest Regards
guy038
-
super answer @guy038 thanks.
I made a short version of yours:
<title>\K(?![^\x00-\x7F]+).*?\|- finds the first line<title>\K([^\x00-\x7F]+).*?\|- finds the second line
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login