Changes

Jump to navigation Jump to search
no edit summary
\ escape the next thing (e.g. \} matches })
[^...] not whatever (...)
 
 
More regular expressions: [https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference]
==Lex Machina==
 
===Cohort Breakout for Accelerator Project===
 
There are 3 methods to take to try and breakout cohorts on a website.
 
# Typing them out by hand (tedious).
# Copying and pasting the entire cohort page.
# Going into the page's Inspect Element.
 
For methods 2 and 3, we can use Regular Expressions. However, whichever method you choose depends on what is easiest because certain situations mean that typing out the names by hand will be faster or using regular expressions will be faster.
 
====Method 2====
 
# Copy the entire cohort page information, open RDP and go to TextPad, and paste it into the TextPad.
# Go to the top menu bar and click on Search, and then Replace.
# In the Replace popup, make sure you check off 'Regular Expressions' in the Conditions.
# Use the regular expressions shown above to remove any not needed information or fix formatting from the cohort information.
: For instance, if there's a list of cohorts on the TextPad going vertically and we want to move them to be on 1 line separated by a tab, in the Replace popup, we can put \n in the Find What and \t in the Replace With (this mean replace every instance of a newline with a tab).
# After it is formatted correctly, move the Cohort names back to the Excel sheet.
 
====Method 3====
 
# Go to the cohort page, right click, and click on Inspect. This open a window on the right side of the screen.
# Hover over different parts of the code until it highlights all of the cohorts.
# Next to that line of code, click on the three dots, and click on Copy element.
# Paste this into a TextPad.
# This method takes a lot more knowledge on Regular Expressions to try and isolate the cohort names from all of the other info. Usually the name is after "title="" in the code, but you have to make sure that you are not deleting other important information.
# This method is only recommended if you are more experienced with regular expressions or if the startups on the cohort page are just images and not text.
# Use regular expressions like Method 2 to get the names, and then move it back to the excel spreadsheet.
 
===Task===

Navigation menu