From: Daniel Bye Date: 2011-07-25T18:14:44+09:00 Subject: Re: Help with Regex --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 25, 2011 at 12:11:03AM +0900, Gregory Ma wrote: > Hi, >=20 > I need help with a Regular Expression, I need to split the text on "- " > on get the first element. >=20 > "Web Application / QA Developer (Mid-Senior Level) - BFG Interactive - > (Hilton Head Island, SC) - FullTime" >=20 > I tried this, but it doesn't work: /(.*) - /i Try the non-greedy version, /(.*?) -/i Dan --=20 Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk4tM/MACgkQixf5fBYiFmqLhQCgjebpEagnTgnfn4MEbMBdy1hO As4AoMN4X0/xo8sJoGjEurM/9OJd8Tu3 =1QCG -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--