Sign in to follow this  
Followers 0
narayanjr

Help with StringRegExp

2 posts in this topic

Well I need to take the source from a web site and take every Six letter word out of the source.

Then I am going to write the words to a file and use them for a game i am making.

All i need help with is getting the Six letter words

I can do it with for loops and all kinds of stuff but I would prefer to do it with StringRegExp if i can since it would be alot shorter

A few i have tried:

[alpha][^punct]\b(......)

\S\b......

[a-z][A-Z]......

\w......

and

a lot of others I just cant get it right

Thanks for any help

Share this post


Link to post
Share on other sites



Hello,

... take every Six letter word out ...

That should point you towards what you want:

#include <array.au3>

$MyString="12345678abcdef9876abcde54321namexy1234"

$NameArr=StringRegExp($MyString,"\D{6}",3)
_ArrayDisplay($NameArr)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0