Jump to content
UBot Underground

Recommended Posts

I have some text here : http://xxxx.net/fire.php?eid=5&ofid=24&varme=1-16210 and I am trying to extract using find regular expression using this : http://dl.dropbox.com/u/2397195/sshot-16.png

 

but its returning the entire line back for some reason.

 

 

 

Try this website: http://rubular.com/

 

It can help you creak down the regular expression you are using, line by line, so that you can figure out what is matching and what is causing the issues.

Link to post
Share on other sites

Your regex line is faulty. The '.' right in the beginning is telling the regex statement to grab the whole line. Acutally it's saying grab anything but a new line character. Doesn't matter what follows it.

 

Frank

Link to post
Share on other sites

Yes, you are not correct. The '.' states to match any character with the exception of the new line character. The '+' right after it states to match 1 or more of the previous sequence, which is the '.'.

 

If you wish to filter from left to right, put a '^' in the very front. This states that you are telling the regex statement to start matching from the front of the line.

 

If you want to get a better handle on regex, then head over to this thread here: http://ubotstudio.com/forum/index.php?/topic/5919-seth-ive-got-to-say/

 

You'll find a video link there that talks about regex.

 

Frank

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...