Jump to content
UBot Underground

Search For Two, Three And Four Letter Words


Recommended Posts

Hi all,

Wondering if you could help - I am looking to scan a page for any two, thee or four letter words on it that are upper case.

For example:

 

AB

ABC

ABCD

 

Would appreciate any suggestions on how I would accomplish this.

Thanks in advance,

Kev

Link to post
Share on other sites

Hey Kev,

alert($find regular expression("a
BA
The
Life
lives","\b[a-zA-Z]\{3\}\b"))

This gets a 3 letter word.
Be sure to hit the " button before you close the node!

 

\b[a-zA-Z]{3}\b

 

Change the three to whatever amount of characters,

 

Regards,

Nick

Link to post
Share on other sites
alert($Regex Words("a
BA
The
Life
lives", 5))
define $Regex Words(#TEXT, #CHARACTERS) {
    return($find regular expression(#TEXT,"\b[a-zA-Z]\{{#CHARACTERS}\}\b"))
}

Here is a function so you don't need to worry about the quotes all the time

 

 

KEV regex words.ubot

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...