-5

I have a text file that in it i have some text's that i must collect them. My text is like this. I want to extract networks count,networks name and networks password. I tried to use regular expression but I do not know what expression i must use for this.Thanks for your helping.

1 Answers1

0

Okay, So to extract the ssid and psk from the file, you can try this :

ssid="([\w ]+)"|psk="([\w ]+)"

where it searches for

-->ssid=" and extracts the content within the ". Similarly for the psk.

There is a OR between them so it will search for both the words. You can get the extracted data with the help of numbered groups.

PS: Do not forget to escape the characters.

XOR-Manik
  • 493
  • 1
  • 4
  • 19