regex to convert j to character

Discussion in 'Java' started by Mo, Feb 15, 2007.

  1. Mo

    Mo Guest

    Hi,

    Any body knows regex to convert & # 1 0 6 ; to character "J"?

    Thanks,
    Mo
     
    Mo, Feb 15, 2007
    #1
    1. Advertising

  2. Mo wrote:
    > Hi,
    >
    > Any body knows regex to convert & # 1 0 6 ; to character "J"?
    >
    > Thanks,
    > Mo
    >


    String.replaceAll("\\&\\#106",J");

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Feb 15, 2007
    #2
    1. Advertising

  3. Mo

    Oliver Wong Guest

    "Knute Johnson" <> wrote in message
    news:p6UAh.206876$...
    > Mo wrote:
    >> Hi,
    >>
    >> Any body knows regex to convert & # 1 0 6 ; to character "J"?
    >>
    >> Thanks,
    >> Mo
    >>

    >
    > String.replaceAll("\\&\\#106",J");


    Don't forget the semicolon at the end.

    You might be able to generalize this by matching any number between the
    hash and the semicolon (as opposed to only 106), and then selecting which
    character to replace with based on what number was matched -- depending on
    whether or not that was what you wanted to do in the first place, of course.


    - Oliver
     
    Oliver Wong, Feb 15, 2007
    #3
  4. Oliver Wong wrote:
    > "Knute Johnson" <> wrote in message
    > news:p6UAh.206876$...
    >> Mo wrote:
    >>> Hi,
    >>>
    >>> Any body knows regex to convert & # 1 0 6 ; to character "J"?
    >>>
    >>> Thanks,
    >>> Mo
    >>>

    >> String.replaceAll("\\&\\#106",J");

    >
    > Don't forget the semicolon at the end.
    >
    >
    > - Oliver


    It was late. I got 83% of his characters :).

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Feb 15, 2007
    #4
  5. Knute Johnson wrote:
    > Oliver Wong wrote:
    >> "Knute Johnson" <> wrote in message
    >> news:p6UAh.206876$...
    >>> Mo wrote:
    >>>> Hi,
    >>>>
    >>>> Any body knows regex to convert & # 1 0 6 ; to character "J"?
    >>>>
    >>>> Thanks,
    >>>> Mo
    >>>>
    >>> String.replaceAll("\\&\\#106",J");

    >>
    >> Don't forget the semicolon at the end.
    >>
    >>
    >> - Oliver

    >
    > It was late. I got 83% of his characters :).
    >


    The other 17% were caught by the solution to the identical question the
    OP multiposted to comp.lang.perl.misc
     
    RedGrittyBrick, Feb 15, 2007
    #5
  6. RedGrittyBrick wrote:
    > Knute Johnson wrote:
    >> Oliver Wong wrote:
    >>> "Knute Johnson" <> wrote in message
    >>> news:p6UAh.206876$...
    >>>> Mo wrote:
    >>>>> Hi,
    >>>>>
    >>>>> Any body knows regex to convert & # 1 0 6 ; to character "J"?
    >>>>>
    >>>>> Thanks,
    >>>>> Mo
    >>>>>
    >>>> String.replaceAll("\\&\\#106",J");
    >>>
    >>> Don't forget the semicolon at the end.
    >>>
    >>>
    >>> - Oliver

    >>
    >> It was late. I got 83% of his characters :).
    >>

    >
    > The other 17% were caught by the solution to the identical question the
    > OP multiposted to comp.lang.perl.misc


    There you go, I should have just gone to bed!

    --

    Knute Johnson
    email s/nospam/knute/
     
    Knute Johnson, Feb 16, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,937
    Dennis Lee Bieber
    Jan 18, 2007
  2. WANG Cong

    K&R2, page 106 <strcmp>

    WANG Cong, Apr 10, 2008, in forum: C Programming
    Replies:
    2
    Views:
    297
    Bartc
    Apr 10, 2008
  3. Ruby Quiz

    [QUIZ] Chess960 (#106)

    Ruby Quiz, Dec 15, 2006, in forum: Ruby
    Replies:
    20
    Views:
    282
    James Edward Gray II
    Dec 21, 2006
  4. Ruby Quiz

    [SUMMARY] Chess960 (#106)

    Ruby Quiz, Dec 21, 2006, in forum: Ruby
    Replies:
    6
    Views:
    107
  5. Mo
    Replies:
    1
    Views:
    90
    Mumia W.
    Feb 15, 2007
Loading...

Share This Page