Results 1 to 4 of 4

Thread: Regular Expressions Ignoring 1st Match (Resolved)

Threaded View

  1. #1

    Thread Starter
    Addicted Member señorbadger's Avatar
    Join Date
    Oct 2003
    Location
    Mud pools of wellingborough
    Posts
    193

    Resolved Regular Expressions Ignoring 1st Match (Resolved)

    Im trying to make a regular expression to modify a string like below...

    Input: 05-0218 C1-AD-0-YN -01
    Output: 05-0218 C1 AD 0 YN 01

    So basically i want to remove all hypen's accept the first hypen.

    I've got it tooo...

    (?>-)+

    which evalulates to...
    Input: 05-0218 C1-AD-0-YN -01
    Output: 05 0218 C1 AD 0 YN 01

    I'm just learning Regexp at the moment so forgive my stupidity
    Last edited by señorbadger; Apr 11th, 2007 at 12:03 PM. Reason: Solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width