Jump to content
Helio13

Duvida no split()

Recommended Posts

Helio13

Oi.

Não sei bem como fazer o spit()

Tendo esta string [<GridFSProxy: 51c428958774a70f68f69c0c>], como consigo obter apenas o numero?

Alguém me pode ajudar?

Share this post


Link to post
Share on other sites
clera

boas,

penso que o mais fácil é verificares caracter a caracter se é número ou não e ires juntando os vários caracteres que o forem.

Share this post


Link to post
Share on other sites
Helio13

Obrigado, mas já consegui fazer...fiz assim:

string.split(': ')[1].split('>')[0]

Edited by Helio13

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.