The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

INVOKE: UFicle by SnArL2007-05-18 06:30:59
  Do you need to change an 'a' in a literal regex, by Esteis2007-05-18 06:39:13
    I need to change the literal A in a regex by SnArL2007-05-18 06:43:46
      Okay, so that's the first example. by Esteis 2007-05-18 06:49:03
How about

s/A\([0-9]\{6\}\)/a\1/

Broken down:

s/                  # to find:
    A                 # starts with a capital 'A'
    \(                # capture the number, we'll need it later
        [0-9]\{6\}    # six-digit number
    \)
 /                  # and replace it with:
    a                 # a lowercase 'a' at the start
    \1                # and the same number
 /
[ Reply ]
        \o/ Woohoo! That works! by SnArL2007-05-18 06:56:50
          Give me a few minutes and I'll get you by Esteis2007-05-18 06:57:42
            Makes sure to use the extra-heavy packets ;) (n/t) by CynicalRyan2007-05-18 07:00:54
            Got it! The best Regex reference sheet there is. by Esteis2007-05-18 07:01:55
              Oh. That's AWESOME! Thanks! (n/t) by SnArL2007-05-18 07:29:23

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)