jerry.gadd
April 30th, 2003, 05:35 AM
I have to extract data from two stings
I use RegExp to test if the strings match my pattern first.
But now I want to use RegExp to extract the data
Can somebody help me write the patterns
example string1:
Source : [TnxEmpApp_test/schema]
Test : ^\[TnxEmpApp[^\[\]\/]+\/[^\[\]\/]+\]$
What is the expressions to get thefollowing results
result1 : TnxEmpApp_test
result2 : schema
example string2:
Source : "key" = "value"
Test : ^"[^"=]+" = " ^[^=]+"$
What is the expressions to get thefollowing results
result1 : key
result2 : value
I use RegExp to test if the strings match my pattern first.
But now I want to use RegExp to extract the data
Can somebody help me write the patterns
example string1:
Source : [TnxEmpApp_test/schema]
Test : ^\[TnxEmpApp[^\[\]\/]+\/[^\[\]\/]+\]$
What is the expressions to get thefollowing results
result1 : TnxEmpApp_test
result2 : schema
example string2:
Source : "key" = "value"
Test : ^"[^"=]+" = " ^[^=]+"$
What is the expressions to get thefollowing results
result1 : key
result2 : value