4 Replies Latest reply on May 11, 2018 10:06 PM by pedropablo.rodriguez

    Extract # of MBs from a string

    pedropablo.rodriguez

      Hi folks!

       

      Do you know how can i extract the number of MB of each row? this is my information row:

       

      """08021128484 main account balance is N1207. Your Balances are Android2: 4706MB till 29-May. \r\n .Yo"

      """08021128484 main account balance is N1216. Your Balances are Android2: 5137MB till 29-May. \r\nNigh"

      """08021128484 main account balance is N1462. Your Balances are Android2: 5312MB till 29-May. \r\nNigh"

      """08022225350 main account balance is N5561 and data is 8MB till 30-Apr. \r\nAndroid: 5991MB till 07-"

      """08022225350 main account balance is N5672 and data is 8MB till 30-Apr. \r\nAndroid: 6227MB till 07-"

      """08022225350 main account balance is N5780 and data is 8MB till 30-Apr. \r\nAndroid: 6838MB till 07-"

      """08023431991 main account balance is N2. Your Balances are Android: 1109MB till 18-Apr."""

      """08023431991 main account balance is N2. Your Balances are Android: 1119MB till 18-Apr."""

      """08023431991 main account balance is N25 and data is 0MB till 02-May. \r\nAndroid: 1519MB till 28-Ma"

      """08023431991 main account balance is N1075 and data is 0MB till 02-May. \r\nAndroid: 1516MB till 28-"

      """08023547229 main account balance is N0. Your Balances are Android: 0MB till 10-May."""

      """08023547229 main account balance is N5. Your Balances are Android: 0MB till 10-May."""

      """08023547229 main account balance is N5. Your Balances are BB Plan: 1724MB till 27-Apr. \r\nNight Bo"

      """08025566604 main account balance is N512 and data is 923MB till 24-Mar. \r\nBonus: 15MB till 22-Mar"

      """08025566604 main account balance is N572 and data is 0MB till 26-Apr. \r\nAndroid: 0MB till 27-Apr."

      """08027180767 main account balance is N0. Your Balances are Android: 1409MB till 05-May."""

      """08027180767 main account balance is N4. Your Balances are Android: 772MB till 26-May."""

      """08028392955 main account balance is N751. Your Balances are Bonus: 5MB till 03-May."""Data

      """08038211078 main account balance is N269 and data is 215MB till 14-May. \r\nAndroid: 0MB till 15-Ma"

      """08038211078 main account balance is N284 and data is 391MB till 14-May. \r\nAndroid: 0MB till 15-Ma"

      """08038211078 main account balance is N309. Your Balances are BB Plan: 0MB till 19-Apr. \r\nAndroid: "

       

      i want to extract the string 4706MB (first row) and only use 4706 to convert in integer to use in a grouo to create a range. I havent calculate because it doesnt follow a string structure, always is different.

       

      Regards and thanks!