• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.

Regular Expressions

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

  • mudskipper
    replied
    Originally posted by Netraider View Post
    Cheers Veteran, I'll work through and see how I go.

    Leave a comment:


  • Netraider
    replied
    Originally posted by vetran View Post
    Cheers Veteran, I'll work through and see how I go.
    Last edited by Netraider; 27 November 2016, 18:37. Reason: Wrong poster mentioned

    Leave a comment:


  • eek
    replied
    Originally posted by Netraider View Post
    Unfortunately, the form that I enter the expression into says - Regular Expression did not match"
    Originally posted by eek View Post
    "^.*srccountry=\"(.+)\"" should do it from memory...
    Yep because it's got a $ you don't need try the above

    Leave a comment:


  • vetran
    replied
    RegExr: Learn, Build, & Test RegEx

    Leave a comment:


  • Netraider
    replied
    Originally posted by eek View Post
    "^.*srccountry=\"(.+)\"$" should do it from memory...
    Unfortunately, the form that I enter the expression into says - Regular Expression did not match"

    Leave a comment:


  • eek
    replied
    "^.*srccountry=\"(.+)\"$" should do it from memory...

    Leave a comment:


  • stek
    replied
    Originally posted by Netraider View Post
    I'm hoping somebody on the panel can help me. I am trying to extract some information from a log file See below for example



    When I use Regular Expression "^.*srccountry=(.+)$" to try and extract the country from "srccountry" I get



    How do I just get the country from the Log?
    Scanning that ip....

    Leave a comment:


  • Netraider
    started a topic Regular Expressions

    Regular Expressions

    I'm hoping somebody on the panel can help me. I am trying to extract some information from a log file See below for example

    date=2016-11-26 time=17:03:26 devname=XXXXX3X15013159 devid=XXXXX3X15013159 logid=0001000014 type=traffic subtype=local level=notice vd=root srcip=109.176.192.91 srcport=4927 srcintf="wan" dstip=xxx.xxx.xxx.170 dstport=23 dstintf="root" sessionid=2417401 proto=6 action=deny policyid=0 policytype=local-in-policy dstcountry="United Kingdom" srccountry="United Kingdom" trandisp=noop service="TELNET" app="Console Management(Telnet)" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 appcat="unscanned" crscore=30 craction=131072 crlevel=critical
    When I use Regular Expression "^.*srccountry=(.+)$" to try and extract the country from "srccountry" I get

    "United Kingdom" trandisp=noop service="TELNET" app="Console Management(Telnet)" duration=0 sentbyte=0 rcvdbyte=0 sentpkt=0 appcat="unscanned" crscore=30 craction=131072 crlevel=critical
    How do I just get the country from the Log?

Working...
X