473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

what's a good regex for replacing ' followed by any character

Hi,

I've been trying to parse words like it's, can't, etc. so that all i'm left with is the root word i.e it for the word it's and can for the word can't.
This is what i have tried so far:

Expand|Select|Wrap|Line Numbers
  1. String regex = "('.*$)|('[a-z]+)|('(\\w)+)";
  2.  
sadly, nothing is working... what am i doing wrong?

thx
Oct 21 '11 #1
0 1010

Sign in to post your reply or Sign up for a free account.

Similar topics

28
by: David MacQuigg | last post by:
I'm concerned that with all the focus on obj$func binding, &closures, and other not-so-pretty details of Prothon, that we are missing what is really good - the simplification of classes. There are...
7
by: Michele Simionato | last post by:
So far, I have not installed Prothon, nor I have experience with Io, Self or other prototype-based languages. Still, from the discussion on the mailing list, I have got the strong impression that...
9
by: Leif K-Brooks | last post by:
How do I make a regular expression which will match the same character repeated one or more times, instead of matching repetitions of any (possibly non-same) characters like ".+" does? In other...
1
by: d | last post by:
what is good irc networks and channels avialable for c programmers -- interchange chowdhury and indiatimes to reply ||||||||| ,,,,,,,, -- { ^ } \v/
4
by: C# Learner | last post by:
What's the "standard" way of replacing a character in a string? Obviously, I can't say "myString = character;" because strings are immutable... So what would be the "standard" way of doing this?...
2
by: Just Me | last post by:
I insert text in a RichTextBox ending each line with vbCrLf. I think when I search the RichTextBox text I do not find any CR's. In the Text property is the end of line char a LineFeed? Are...
2
by: Brett Romero | last post by:
I have a string with the following XML and need to remove all of the back slashes "<ROOT><Person PersonId=\"56102\" /><Person PersonId=\"56104\" /><Person PersonId=\"71266\" /></ROOT>" I use...
3
by: sklett | last post by:
I have this pattern: @"\s*//\$\$\s*Targets:\s*(+)" to match this line: //$$Targets: thing, thing+ When I get a match, the first Group (index 1, not 0) has: "thing, thing" - it drops the plus...
4
by: =?Utf-8?B?anNoMDJfbm92YQ==?= | last post by:
Is this 'good' code to debug? //Create separate Type library namespace Common { public sealed class Statuses { internal Statuses(){} public sealed class Good {
2
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me , what is meaning of the below jquery statement $('~ span:first',this).text(); i dont understand meaning of the ~ in jquery selector thanks very much for all...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.