Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
implementations proposed (both):
    def get_regex_strings(self, regular_expressions) :
        """
            Return all taget strings matched the regex uin input
        """
        str_list = []
        if regular_expressions.count == None :
            return str_list
        for i in self.strings :
            cur_str = i.get()
            for j in expressions.string :
                expr = j.get())
                if re.search(expr, cur_str) :
                    str_list.append(cur_str)
                    break;
        return str_list 

    def get_matched_strings(self, substr) :
        """
            Return all taget strings containing the substr in input
        """
        str_list = []
        if (sustr == None)
            return str_list
        for i in self.strings :
            cur_str = i.get()
            if cur_str.find(substr) != -1 :
                str_list.append(cur_str)
        return str_list 

Original comment by [email protected] on 12 Jan 2012 at 3:09

from androguard.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Sorry, the previous post contained some syntax errors...I copied the code from 
a wrong version    
def get_regex_strings(self, regular_expressions) :
        """
            Return all taget strings matched the regex uin input
        """
        str_list = []
        if regular_expressions.count is None :
            return None
        for i in self.strings :
            cur_str = i.get()
            for j in expressions.string :
                expr = j.get()
                if re.search(expr, cur_str) :
                    str_list.append(cur_str)
                    break;
        return str_list 

    def get_matched_strings(self, substr) :
        """
            Return all taget strings containing the substr in input
        """
        str_list = []
        if (sustr is None):
            return None
        for i in self.strings :
            cur_str = i.get()
            if cur_str.find(substr) != -1 :
                str_list.append(cur_str)
        return str_list 

Original comment by [email protected] on 19 Jan 2012 at 11:27

from androguard.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Thx, it will be added :)

Original comment by [email protected] on 29 Jan 2012 at 3:15

  • Changed state: Started
  • Added labels: Milestone-Release1.0

from androguard.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Hi,

can you test with the latest mercurial version ?

I added only one function get_regex_strings and you can search a regexp, substr 
...

Original comment by [email protected] on 23 Mar 2012 at 9:00

from androguard.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
ok, tested.
It seems ok.

Original comment by [email protected] on 29 Mar 2012 at 1:31

from androguard.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024

Original comment by [email protected] on 29 Mar 2012 at 3:08

  • Changed state: Fixed

from androguard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.