HarrisonHill 0 Posted June 25, 2011 Report Share Posted June 25, 2011 How to match password: "FrsAd8evKk" using regex in the following text? Thank you for registering at our website. You may now log in using the following username and password: username: borhesoeqpassword: FbpAd8evRk Thank you. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted June 25, 2011 Report Share Posted June 25, 2011 Check this password.ubot Quote Link to post Share on other sites
HarrisonHill 0 Posted June 25, 2011 Author Report Share Posted June 25, 2011 Thanks but "password: \w+" selects first mention of "password" which is in text "You may now log in using the following username and password:" So final output of this regex is: password: username What regex should I use to select second mention of password which is the actual password and also, select the actual password only (I mean to remove "password:" in the output and select characters which are followed by word password: ) Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted June 25, 2011 Report Share Posted June 25, 2011 From the source I attached it only gets the second mention of password. Try this one password:\s\w+ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.