Help on RegExp

P

pbreah

I made a pattern to exclude HTML tags and text within the opening
brace '{' and the closing brace '}' and match all the rest.

Here is the pattern:

((?![^<]+>)|(?=[{]}))(?![^&]+;)" + letterVar + "(?![^&]+;)(?![^<]+
[>}]

// This is inside a for loop, updating letterVar from A to Z

Problem #1: Let say I have the following text:

<pre>
is this ok?

{On Tue, 24 Apr 2007 16:47:31 -0500}
{ said:
█████ ████ ██ █ ████
</pre>

But when I run this pattern it doesn't match the text "is this ok?" I
want to correct this pattern to include this text. The whole idea is
that the pattern has to match any letter not inside any HTML tag, not
any letter from HTML entities, and match any letter outside of these
two cases.

Any help is appreciated,

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,901
Members
47,439
Latest member
elif2sghost

Latest Threads

Top