Beginner question: detecting specified character in string

From: Julia Briggs (julia4_me_at_yahoo.com)
Date: 02/25/05


Date: 24 Feb 2005 21:38:33 -0800

Hello, trying to create logic tests against a string allowing someone
to enter a certain character once or twice into a form consecutively,
but not twice seperated between other characters....

so,

hello##there (ok)
hello#there (ok)
#hello#there (no)
##hello#there (no)
###hellothere (no)

How would I do this? I was looking at strstr and some others, but not
sure. I have many challenges like this ahead, so hopefully someone
building this will help my mind figure out other designs.

Thanks so much!

-Julie



Relevant Pages

  • Beginner question: detecting specified character in string
    ... trying to create logic tests against a string allowing someone ... to enter a certain character once or twice into a form consecutively, ... building this will help my mind figure out other designs. ...
    (comp.lang.php)
  • Beginner question: detecting specified character in string
    ... trying to create logic tests against a string allowing someone ... to enter a certain character once or twice into a form consecutively, ... building this will help my mind figure out other designs. ...
    (php.general)
  • [TOMOYO #15 3/8] Common functions for TOMOYO Linux.
    ... This file contains common functions (e.g. policy I/O, pattern matching). ... Since TOMOYO Linux is a name based access control, ... TOMOYO Linux's string manipulation functions make reviewers feel crazy, ... the Linux kernel accepts all characters but NUL character ...
    (Linux-Kernel)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)