Re: [algogeeks] Doubt on Regular Expression
In regular expr, even a space is also a character. so u can exclude all those spaces(stay in the same state if u encounter a space character) in a word. On Wed, Apr 4, 2012 at 5:05 PM, atul anand wrote: > i am not sure , but wont x.trim() will remove extra spaces from the > string... > > > On Wed, Apr 4, 2012 at 12:32 AM, Debabrata Das < > debabrata.barunhal...@gmail.com> wrote: > >> Hi All, >> >> I was looking for an regular expression such that given a string X,it >> should exclude a token in single quote preceded by a particular >> string. >> >> e.g in java say. >> >> String X=" 'abc ' like'abc ' ='abc'" >> N.replaceall("reg expression" "??") would transform it to : ?? like >> 'abc ' =?? ( remove extra space as well but not spaces in single >> quote) >> >> Please let me know if you have any doubt. >> >> Thanks, >> Debabrata >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Doubt on Regular Expression
i am not sure , but wont x.trim() will remove extra spaces from the string... On Wed, Apr 4, 2012 at 12:32 AM, Debabrata Das < debabrata.barunhal...@gmail.com> wrote: > Hi All, > > I was looking for an regular expression such that given a string X,it > should exclude a token in single quote preceded by a particular > string. > > e.g in java say. > > String X=" 'abc ' like'abc ' ='abc'" > N.replaceall("reg expression" "??") would transform it to : ?? like > 'abc ' =?? ( remove extra space as well but not spaces in single > quote) > > Please let me know if you have any doubt. > > Thanks, > Debabrata > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Doubt on Regular Expression
Hi All, I was looking for an regular expression such that given a string X,it should exclude a token in single quote preceded by a particular string. e.g in java say. String X=" 'abc ' like'abc ' ='abc'" N.replaceall("reg expression" "??") would transform it to : ?? like 'abc ' =?? ( remove extra space as well but not spaces in single quote) Please let me know if you have any doubt. Thanks, Debabrata -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.