Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

regex to convert j to character

Thread view: 
Mo - 15 Feb 2007 05:32 GMT
Hi,

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

Thanks,
Mo
Knute Johnson - 15 Feb 2007 07:39 GMT
> Hi,
>
> Any body knows regex to convert & # 1 0 6 ; to character "J"?
>
> Thanks,
> Mo

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

Signature

Knute Johnson
email s/nospam/knute/

Oliver Wong - 15 Feb 2007 15:45 GMT
>> Hi,
>>
[quoted text clipped - 4 lines]
>
> 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
Knute Johnson - 15 Feb 2007 17:13 GMT
>>> Hi,
>>>
[quoted text clipped - 8 lines]
>
>     - Oliver

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

Signature

Knute Johnson
email s/nospam/knute/

RedGrittyBrick - 15 Feb 2007 23:25 GMT
>>>> Hi,
>>>>
[quoted text clipped - 10 lines]
>
> 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
Knute Johnson - 16 Feb 2007 04:48 GMT
>>>>> Hi,
>>>>>
[quoted text clipped - 13 lines]
> 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!

Signature

Knute Johnson
email s/nospam/knute/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.