Regex: Select all the words that doesn't have . in front of
-
hello. I want to match all words “html” that doesn’t have . in front of
for example:
my-baby.html
my-babyhtml- this is the kind of links that I want to matchI try this, but doesn’t work
.(?<!)html -
ok, I find an answer:
\w+([^.])(?=html)but I don’t want to match words with signs like:
#"=\before, such as#htmlonly letters before html, such as
my-babyhtmlI try
(?<=[^",=#])\w+([^.])(?=html)but this will match everything that contains htmlHelp please
-
Got it.
FIND:
\w+([^.#"</ ])(?=html)this will find all words html that has only letters before it, such as
my-babyhtmlwill not match words like
#htmlor<htmlor"html
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