Jump to content
UBot Underground

How to select first instance in regex?


Recommended Posts

Hey guys, I use this for regex http://gskinner.com/RegExr/

 

 

Suppose I want to choose the first instance of a sentence

 

I use ([A-Z].*?[\.]) and it will select every sentence? Why?

 

 

Or if I use ([\w-\.]+)@((?:[\w]+\.)+)([a-zA-Z]{2,4}) to select email addresses, how do I limit this to choose only the first email address, and not all the e,ail addresses?

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