This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

regexp question

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

regexp question

Post by Ofloo »

Code: Select all

[regexp ^\[a-zA-Z\]+\.\[0-9a-zA-Z\]+$ [reverse_string [lindex $arg 0]]]
this string is meanth to match a host so all hosts exists out of host.tld atleast domain.tld so i was wondering how i could make a match to check that ?? i could check for the string matched a "." but then an ip would match it as well so ..
XplaiN but think of me as stupid
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

something like

Code: Select all

regexp -all {[a-zA-Z]} $text
will match ONLY words without numbers.
Once the game is over, the king and the pawn go back in the same box.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

euhm no it is supposed to match this ..


????\.?*

or

*?\.????

also host can match figurs not only words ..

domain.tld = tld only words no figurs ..

domain = words and figurs

so

domain \[a-Z0-9\]

tld \[a-Z\]
XplaiN but think of me as stupid
Locked