Search found 30 matches

by srive99
Thu Nov 29, 2012 7:32 pm
Forum: General
Topic: Remove everything after 4th white space
Replies: 5
Views: 1268

Remove everything after 4th white space

Hello,
I have the strings

111 111 111 some text here
234 1 43 some more text here
1 0 213 some other text here 11


I need to replace so I need following..


111 111 111
234 1 43
1 0 213


Could some one help me out with regular expression. Essentially I need to remove everything after 3rd ...
by srive99
Wed Jul 18, 2012 2:05 pm
Forum: General
Topic: date format help
Replies: 2
Views: 569

date format help

Hello All,

I have a date coming to my application and within the application I need to convert date format using regex. Could some one help me.

my input date could be any of following...
this is just an example date

12/12/12
1/12/12
12/1/12
12/12/2012
1/12/2012
12/1/2012

and my desired output ...
by srive99
Mon Feb 06, 2012 5:14 pm
Forum: General
Topic: get last 4 digits
Replies: 1
Views: 280

get last 4 digits

Hey All,
I have a numbers like below

********1234
****3432
******5244
*********3245

from those lines I need to get the last 4 numbers

1234
3432
5244
3245

Any one have an idea how we can get those.

Thanks
by srive99
Fri Jan 20, 2012 9:19 pm
Forum: General
Topic: Covert case
Replies: 1
Views: 246

Covert case

Hey All,
I have a file with bunch of ldap names. and some files has lower case name and some files has uppercase.


nameone
nametwo
namethree



NAMEONE
NAMETWO
NAMETHREE


now I need to change the name to Sentense case. for exampl

Nameone
Nametwo
Namethree


Anyone have an idea how we can ...
by srive99
Wed Dec 28, 2011 7:19 pm
Forum: General
Topic: Replace a line start with single space
Replies: 9
Views: 1038

You are the man. That did the trick.

Thanks a bunch.
by srive99
Wed Dec 28, 2011 6:54 pm
Forum: General
Topic: Replace a line start with single space
Replies: 9
Views: 1038

I just tried again but no luck. I did not use it with first one as I had to use those on two different files.
As the first one worked, I been working on the second where I need to join the lines with preceding lines.

I'm using following..


Find what: ^\n- (space instead of -)
Replace with: n/a ...
by srive99
Wed Dec 28, 2011 5:23 pm
Forum: General
Topic: Replace a line start with single space
Replies: 9
Views: 1038

Thanks Ben

First one worked to remove the lines that start with a space but second one did not work to join the lines
that starts with space to the preceding line.
I get the can not find regular expression error. I made sure Regular Expression checkbox selected.



dn: cn=user,ou=test,ou=test,dc ...
by srive99
Tue Dec 27, 2011 2:19 pm
Forum: General
Topic: Replace a line start with single space
Replies: 9
Views: 1038

I tried but when I try with second RE, it stuck and never come back. Had to to kill the textpad.

Thanks
by srive99
Fri Dec 23, 2011 2:08 pm
Forum: General
Topic: add hyphen between lines
Replies: 1
Views: 292

add hyphen between lines

Hello,

I have a following data ..


dn: cn=some,ou=orgperson,o=org
changetype: modify
add: attribute
attribute: somevalue
attribute: someother
attribute: somethinglese

dn: cn=some,ou=orgperson,o=org
changetype: modify
add: attribute
attribute: somevalue
attribute: someother



Now I want to add ...
by srive99
Fri Dec 23, 2011 1:36 pm
Forum: General
Topic: Replace a line start with single space
Replies: 9
Views: 1038

Replace a line start with single space

I have following lines in ldap format

cn=some, ou=some, ou=s
ome, o=org
cn=somethingelse, ou=same, o
u=same, o=org
cn=same, ou=some,ou=something,
o=org

I want to do couple of things
1, I want to remove a line that start with space. I'm looking for following output
cn=some, ou=some, ou=s
cn ...
by srive99
Tue Apr 26, 2011 9:10 pm
Forum: General
Topic: find and replace
Replies: 4
Views: 628

I think that may be issue with back slash

Sorry i mistype the data I had
I have a data like below.
dn: cn=usera,ou=some,o=org
some: some\data\someother\data

dn: userb,ou=some,o=org
some: other\data\some\data

and I need like below...
dn: cn=usera,ou=some,o=org
some: some

dn: userb,ou=some,o=org ...
by srive99
Tue Apr 26, 2011 8:24 pm
Forum: General
Topic: find and replace
Replies: 4
Views: 628

Thanks for your quick reply but it did not work for me..
I tried as below
find - /.*
replace - nothing

I made sure regular expression check box selected.

Thanks again..


S earch | R eplace... ( <F8> ):
F i nd what: /.*
Re p lace with: [nothing]

[ X ] Regular e xpression

Replace A ll
by srive99
Tue Apr 26, 2011 7:49 pm
Forum: General
Topic: find and replace
Replies: 4
Views: 628

find and replace

Hi All,
I have a text like below..

dn: cn=user,ou=some,o=org
something: some/data/some/data

dn:cn=usera,ou=some,o=org
something: other/data/other/data

I want to remove everything after first slash like below..

dn: cn=user,ou=some,o=org
something: some

dn:cn=usera,ou=some,o=org
something: other ...
by srive99
Fri Sep 24, 2010 6:54 pm
Forum: General
Topic: Joining lines
Replies: 1
Views: 156

Joining lines

Hi All,

I have an ldif file which is exported from LDAP and its got thousands of lines and some of the DN's are spilted into two lines. How can we can join those lines.

I can do shift J, but since I have thousands of lines that is not good idea.

Here is example of my file

dn: cn=abc,ou=syc ...
by srive99
Thu Sep 23, 2010 8:52 pm
Forum: General
Topic: question
Replies: 8
Views: 1085

question

Thanks, That did the trick.